Support » Fixing WordPress » WordPress Editor Doesn't Format Custom Shortcode!

  • Resolved fatalx


    Hello Everyone,

    I wrote a simple little plugin that embeds videos into JW Player. It does this by using a shortcode [flv]

    so for example

    [flv]video url[/flv]

    when I put this into the editor and try to center it, it generates this code in the editor.

    <p style="text-align: center;">[flv]video[/flv]</p>

    however on the actual site the [flv] embed code is outside of the <p>

    looks like this

    <p style="text-align: center;"></p>
    <object blah blah blah

    Does anyone know why this is?

Viewing 1 replies (of 1 total)
  • fatalx


    Fixed my problem.

    My embed code was enclosed in a div and you can’t put divs into <p> tags. Since a <div> is a block element and <p> only allows inline elements. The proper solution is to replace the <div> with a <span>.

    Hope this helps someone in the future.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Editor Doesn't Format Custom Shortcode!’ is closed to new replies.