Support » Fixing WordPress » New audio player in visual editor forces shortcode to new paragraph

  • Hi all,

    After upgrading to WP 3.9.1 and the latest Jetpack (related?) we noticed that the [audio] shordcodes we are using in about ALL our posts (over 1000) are now replaced with the MediaElements player in the Visual editor tab. This is great except that it now forces the shortcode to always live in its own paragraph!

    The thing is that after much effort we had been able to change the default MediaElements appearance from the black player bar that always takes the full page width into just a simple player button that would fall neatly inline with text (like a track list item)… An example can be seen on where under “Track List” you notice the red player button. It is the same MediaElements player but with different style rules.

    Now the problem: since the update, every time one of our editors modifies a post using the Vidual editor tab, the player gets moved to its own paragraph making it jump out of line with the text that it belongs to.

    I have tried adding these same style rules to our themes editor-style.css and that does make the player in the editor look the same as on the front end. But it does not change the behaviour of those new lines (above and below the shortcode) being added to the content.

    The only way around it seems to be to make all editors use the Text tab instead but that will make life with WordPress suddenly much harder for them!

    I’v tried:

     * Dequeue mediaelements script because it sucks for us?
    function mytheme_editor_dequeue() {
    	wp_dequeue_script( 'media-audiovideo' );
    add_action( 'admin_init', 'mytheme_editor_dequeue', 999 );

    but that does not seem to get rid of the media-audiovideo.js script and even if it would have, I’m not sure if that would change anything or make it worse…

    Is there any way to prevent this issue? Except reverting to WP 3.8.2 or never using the Visual tab anymore 🙁

Viewing 1 replies (of 1 total)
  • Nobody? Is it related to the Jetpack Shortcodes module or is this WP core?

    It really su*ks 🙁

Viewing 1 replies (of 1 total)
  • The topic ‘New audio player in visual editor forces shortcode to new paragraph’ is closed to new replies.