Opened 11 years ago
Closed 8 years ago
#20901 closed enhancement (maybelater)
Taxonomy descriptions should be TinyMCE editable
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | |
Focuses: | administration | Cc: |
Description
Right now taxonomy descriptions are filtered heavily for HTML and are output as a simple textarea, making it impossible to make those into "nice" tinymce editors without a kind of hackish plugin.
I'd be in favor of making taxonomy descriptions tinymce by default.
Change History (14)
#2
@
11 years ago
Sounds like a chicken or egg problem to me :) until they get more prominence in core, not a whole lot of themes will start using them properly... But as said, right now you need to hack your way around to make it TinyMCE, i'd be happy with even a simpler way of doing it.
#3
follow-up:
↓ 5
@
11 years ago
Agreed, there's no reason to strip HTML there, they should follow the same filtering rules like posts and pages. Then adding an editor would be quite easy.
#5
in reply to:
↑ 3
@
11 years ago
Replying to azaozz:
Agreed, there's no reason to strip HTML there, they should follow the same filtering rules like posts and pages. Then adding an editor would be quite easy.
So a step in the right direction here would be to remove the 'wp_filter_kses' filter for term_description, which would eliminate the current HTML filtering. Not finding one in default-filters.php, but does the_content use a similar filter for a more broad allowed HTML tag set?
#6
@
11 years ago
- Cc michael@… added
I think this is a great idea! One thing to add would be to enable shortcodes to be parsed in the term description as well. This could be really helpful when a user creates a category for a location and would like to embed a map.
#8
@
11 years ago
I just messed around with this - it's pretty easy on edit-tag-form.php
, since the page reloads with the form submit:
<?php wp_editor( $tag->description, 'description', array( 'textarea_rows' => 5 ) ) ?>
It's harder on edit-tags.php
because you have to mess with wplink.js
to get the form submission to work, and you have to alter the editor so it fits in the space. You also have to decide whether to parse the data that is displayed in the list table in the description column:
<?php wp_editor( '', 'tag-description', array( 'textarea_rows' => 5, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ), 'tinymce' => array( 'theme_advanced_buttons1' => 'bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink, |, spellchecker,wp_adv', 'theme_advanced_buttons2' => 'formatselect,underline,justifyfull,forecolor,|,charmap,|,outdent,indent,|,undo,redo,wp_help', 'theme_advanced_buttons3' => '', 'theme_advanced_buttons4' => '', ) ) ) ?>
wplink.js
is in a weird limbo state - see #21152
#14
@
8 years ago
- Keywords dev-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to maybelater
- Status changed from new to closed
Closing due to lack of traction over the last couple of years. If someone wants to work up a patch - even if it only removes the kses filtering and doesn't actually add the TinyMCE interface - please feel free to reopen.
Sounds like a plugin territory. They are not shown by many (most?) themes. I had an old plugin to enable TinyMCE there, didn't prove popular.