Opened 12 months ago
Last modified 6 days ago
#20901 new enhancement
Taxonomy descriptions should be TinyMCE editable
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | dev-feedback |
| Cc: | sirzooro, michael@…, ian@…, jeremy@… |
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 (12)
comment:2
joostdevalk — 11 months 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.
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.
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?
- 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.
comment:7
iandstewart — 9 months ago
- Cc ian@… added
comment:8
wonderboymusic — 9 months 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
comment:10
SergeyBiryukov — 5 months ago
#22848 was marked as a duplicate.
comment:11
SergeyBiryukov — 5 months ago
- Component changed from General to Administration
comment:12
SergeyBiryukov — 6 days ago
Previously: #6793

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.