• Resolved golddave

    (@golddave)


    I’m having problems with a blog where a writer is embedding objects (audio, video) using the HTML editor but his boss is using the Visual editor and keeps messing up the embed codes. Disabling the Visual editor may not be an option. Is there a way to protect embed codes from being munged in the Visual editor?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Nope. How about making the boss’ role one that does not let him edit other people’s content (like maybe Author)?

    Thread Starter golddave

    (@golddave)

    That wouldn’t work since his actual position title is Editor. It’s his job to edit the posts.

    How about if you give him a good external editor, disable Visual mode, and let him paste his content in?

    Thread Starter golddave

    (@golddave)

    We can’t disable Visual mode. We may just have to train people to not use Visual mode if there are embeds.

    You can also save your embed codes in an external document so that after they break them in Visual mode they can paste them back in.

    Thread Starter golddave

    (@golddave)

    Would it be possible to escape embed codes by using a shortcode?

    Actually you could probably come up with a way to put the embed codes in an external file and do an include.

    I wonder if WP would eat this code;

    <script src="whatever.js" type="text/javascript"> </script>

    Thread Starter golddave

    (@golddave)

    Can’t do that. We’re not dealing with technical people so we have to keep their involvement as simple as possible. Once we start asking them to copy code somewhere else and reference it here we’re asking them to do too much.

    I was thinking that whoever adds the code does that in HTML mode and anyone who edits the post or page after that does so in Visual mode, as long as WP will not strip out the code.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Protecting Embed Codes From Breaking in the Visual Editor’ is closed to new replies.