[wp-trac] [WordPress Trac] #19666: Switching from HTML to Visual editor removes some line breaks inside PRE
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 26 21:17:07 UTC 2011
#19666: Switching from HTML to Visual editor removes some line breaks inside PRE
--------------------------+------------------------------
Reporter: mrclay | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 3.3
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by mrclay):
19666.patch adds an onBeforeSetContent handler to TinyMCE that converts
newlines to BRs inside PREs just before content is added to the editor.
You can see how this fixes the behavior in
[http://fiddle.tinymce.com/cAaaab this fiddle]. wp-admin/js/editor.js
removes these before POSTing or switching editors, so I think this should
not add side-effects.
BTW I was able to fix this during switching in editor.js, but this still
did not cover the case of when the Visual editor is initialized on page
load. The tinyMCE event handler covers both cases.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19666#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list