[wp-trac] [WordPress Trac] #32513: Disabling WYSIWYG tab via the wp_editor_settings filter breaks the editor if it contains a textarea tag

WordPress Trac noreply at wordpress.org
Thu May 28 00:37:33 UTC 2015


#32513: Disabling WYSIWYG tab via the wp_editor_settings filter breaks the editor
if it contains a textarea tag
----------------------------+-----------------------------
 Reporter:  andruxnet       |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Editor          |    Version:  4.2.2
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 I got the request from a client to disable the WYSIWYG tab so that the
 site admin could only use html for a custom post type, I was able to do
 this using a few techniques - CSS, user_can_richedit filter, plugins, etc
 - but this particular case it was needed to be applied to the default WP
 editor only - the one I print using the_content() - since the site uses
 other wp_editors for that custom post type.

 Anyway I was able to do it using the wp_editor_settings filter, the only
 problem was that the value in this editor contains a textarea tag, and the
 editor breaks as soon as it reaches "<textarea>", as can be seen in the
 screenshot attached.

 I was able to make this work anyway, using a second filter, but I think
 this should be part of the WP core. I would be more than happy to submit
 the fix myself if this issue is considered for the next patch.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32513>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list