WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode Developer
[resolved] Rogue p tags (2 posts)

  1. forepoint
    Member
    Posted 1 year ago #

    Hello,

    I am running to an issue where TinyMCE is adding <p> tags all over the place - this causing the shortcode not to work and essentially breaking the markup.

    Has anyone else run into this?

    In TinyMCE I write:

    [highlight tint_colour="light"]
    <h1>A Title</h1>
    <p>Some Content</p>
    [/highlight]

    But when I save it, it ends up being:

    <p>[highlight tint_colour="light"]</p>
    <h1>A Title</h1>
    <p>Some Content</p>
    <p>[/highlight]</p>

    Then on the front end we end up with something like:

    <p>
    <div class="highlight-box light">
    </p>
    <h1>A Title</h1>
    <p>Some Content</p>
    <p>
    </div>
    </p>

    This might just be me being an idiot and doing something obviously wrong but I just can't work out what is going wrong. I don't think the issue is directly related to the plugin but I might be wrong.

    Any help with this would be great.

    Regards

    Shaun

    http://wordpress.org/extend/plugins/shortcode-developer/

  2. elliotcondon
    Member
    Plugin Author

    Posted 1 year ago #

    Interesting... I believe WP converts all new lines into p tags. What if you remove the line breaks

    Maybe this is a bug which I need to fix. I'll do some testing

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.