TinyMCE Advanced
Plugin is adding p tags to shortcodes (3 posts)

  1. danbodenstein
    Posted 4 years ago #

    I am using shortcodes and nested shortcodes and with the plugin active, it is adding p tags and br tags to the code
    [bucket]mycontent goes here[/bucket]
    [bucket]mycontent goes here[/bucket]
    [bucket]mycontent goes here[/bucket]

    Is this a bug? If not, how do I get rid of it.
    Please note, this is happening after I save the post, not while viewing the page. wpautop is not involved.



  2. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 4 years ago #

    Wpautop replaces line breaks with P or BR tags. Similarly inside the visual editor text strings (the shortcodes are normal text strings in there) are wrapped in paragraphs. There is a function that runs after wpautop and removes the wrapper Ps.

    If you want to avoid any extra P or BR, just put all shortcodes on one line.

  3. alby54
    Posted 4 years ago #

    It is not a TinyMCE or other editor's (like CKE) related bug, since all of them work perfectly in CMS like Modx or Joomla. It is just the WP internal editor that is a real disaster (problems existed way before the TinyMCE inclusion into WP). Get yourself "RAW HTML" plugin and get rid of all the unwanted mistakes like images inserted between <p></p> which, to name one of the many, is definetely a nonsense.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TinyMCE Advanced
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic