Title: WordPress Editor Doesn&#039;t Format Custom Shortcode!
Last modified: August 19, 2016

---

# WordPress Editor Doesn't Format Custom Shortcode!

 *  Resolved [fatalx](https://wordpress.org/support/users/fatalx/)
 * (@fatalx)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-editor-doesnt-format-custom-shortcode/)
 * 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)

 *  Thread Starter [fatalx](https://wordpress.org/support/users/fatalx/)
 * (@fatalx)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-editor-doesnt-format-custom-shortcode/#post-1662539)
 * 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.

## Tags

 * [<p>](https://wordpress.org/support/topic-tag/p/)
 * [custom shortcode](https://wordpress.org/support/topic-tag/custom-shortcode/)
 * [div](https://wordpress.org/support/topic-tag/div/)
 * [editor](https://wordpress.org/support/topic-tag/editor/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [fatalx](https://wordpress.org/support/users/fatalx/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-editor-doesnt-format-custom-shortcode/#post-1662539)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
