[wp-trac] [WordPress Trac] #13327: Post editor puts content through wpautop() before displaying it to users without JS enabled
WordPress Trac
wp-trac at lists.automattic.com
Mon May 10 22:11:05 UTC 2010
#13327: Post editor puts content through wpautop() before displaying it to users
without JS enabled
--------------------------+-------------------------------------------------
Reporter: markjaquith | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: 3.0
Component: Editor | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by markjaquith):
This happens because {{{the_editor()}}} is adding {{{wp_richedit_pre}}} as
a filter on {{{the_editor_content}}}. Because the user is "stuck" in
Visual mode, it formats the content the way TinyMCE wants it... with
paragraph tags.
One possible fix would be to load the TinyMCE version of the content up in
a hidden textarea, load the regular text in the real textarea, and then
attempt to use JS to copy the TinyMCE version over to the real textarea.
Without JS, this would fail, and they'd keep the real content.
For users with JS, this may cause a flicker as that swap takes place. And
we may need to use JS to keep them from trying to edit the content before
this operation has taken place.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13327#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list