[wp-trac] [WordPress Trac] #28444: TinyMCE stops adding paragraph tags to text if you paste text with div tags before starting to write

WordPress Trac noreply at wordpress.org
Wed Jun 4 01:42:17 UTC 2014


#28444: TinyMCE stops adding paragraph tags to text if you paste text with div tags
before starting to write
--------------------------+-----------------------------
 Reporter:  diegoe        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  TinyMCE       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In the Post Editor (Visual mode) if you paste innocently looking text
 (from a website) that contains <div> elements inside, you'll have the auto
 addition of <p> elements to your text broken.

 New lines will be inside <div> elements instead of <p> elements.

 To break the editor:
 1. Select and copy text that is spaced (or just surrounded) with <div>
 elements.
 2. Paste that text into the Post Editor (Visual).
 3. Hit Enter and try to go on with your post.

 Result:
 The text you add, no matter how much you hit enter, will be all surrounded
 with <div>, not with <p>

 Expected Result:
 The text you add behaves as usual and has no tag added, but, of course,
 has automatic <p> tags when shown in your site.

 I can reproduce with trunk. Note that the <div> elements I'm using to test
 have no style or anything.

 See attached HTML test case, you can use the scholarly lyrics in it as a
 test.

 I'm adding some screenshots too.

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


More information about the wp-trac mailing list