[wp-trac] [WordPress Trac] #16086: TinyMCE inserts blank lines after paragraph with image with caption

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 6 17:12:29 UTC 2011


#16086: TinyMCE inserts blank lines after paragraph with image with caption
-------------------------------+------------------------------
 Reporter:  gerobe             |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  3.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by greuben):

 I was checking tiny_mce_src.js from its nightly build, saw some todo(
 commented out code ).
 {{{
 // Use BR instead of   padded P elements inside editor and use
 <p>&nbsp;</p> outside editor
 /*
 if (o.set)
         h = h.replace(/<p>\s+(&nbsp;|&#160;|\u00a0|<br \/>)\s+<\/p>/g,
 '<p><br /></p>');
 else
         h = h.replace(/<p>\s+(&nbsp;|&#160;|\u00a0|<br \/>)\s+<\/p>/g,
 '<p>$1</p>');
 */

 // Since Gecko and Safari keeps whitespace in the DOM we need to
 // remove it inorder to match other browsers. But I think Gecko and Safari
 is right.
 // This process is only done when getting contents out from the editor.
 }}}

 I guess it is the expected behavior.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16086#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list