[wp-trac] [WordPress Trac] #27856: gallery shortcode adding empty parapraphs when switching between text and visual editor

WordPress Trac noreply at wordpress.org
Tue Aug 12 17:06:35 UTC 2014


#27856: gallery shortcode adding empty parapraphs when switching between text and
visual editor
----------------------------+-----------------------
 Reporter:  robinroelofsen  |       Owner:
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:
Component:  Gallery         |     Version:  3.9
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+-----------------------

Comment (by azaozz):

 Replying to [comment:7 yammy]:
 > I'm trying to preserve the html editor with no paragraphs and brs
 stripped or added by editor.

 Perhaps start by setting `wpautop` to false in the TinyMCE init array (or
 unsetting it). The [gallery] shortcode works as expected here:
 `<h1>foo</h1>[gallery][gallery]` turns into
 `<h1>foo</h1><p>[gallery]</p><p>[gallery]</p>` after running it through
 the JS wpautop().

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27856#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list