Nancy White is the first person to add a specific problems for tomorrow’s WordPress and your Problems. Her problem is:
embedding youtube - I know to turn off WYSIWYG but is there an easier way?
First, you can’t do embeds, JavaScript, etc if you are don’t have unfiltered_html, which only the Admin and Editor roles have.
Nancy, describe it works in “code” mode1 so she has sufficient permissions. So this is a big clue that the problem is how we integrated TinyMCE (the WYSIWYG or visual editor) into WordPress.
Although, if I had waited until tomorrow I would have gotten additional important details. I was about to confirm there is a bug in the latest release (2.3.3).
And it is fixed in the next major release (WordPress 2.5), further in 2.5 it will remember whether you were last using Visual or HTML editor mode, so even if the bug still existed, which it doesn’t, it would be worked around.
The bug is #5336 TinyMCE Mangles <object> tag’s and DD32 verified that it is fixed:
WordPress 2.4/2.5’s TinyMCE has a built-in flash functionality.
Heres the HTML it generates: (as seen on the published page, i’m pretty sure its identical in the edit window)
<p><object height="110" width="315" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="http://www.spiegel.de/media/0,4906,16534,00.swf" name="src" /><embed height="110" width="315" src="http://www.spiegel.de/media/0,4906,16534,00.swf" type="application/x-shockwave-flash"></embed></object></p>Appears to be fixed.
So Nancy, it sounds like you have the best work around until WordPress 2.5 which will fix the problem.
- Remove the check mark in front of “Use the visual editor when writing” in your profile (Users > Your Profile [wp-admin/profile.php] [↩]
8 Comments
if disabling the RTE were the only solution, I wouldn’t be using wordpress, and I wouldn’t recommend it to clients. Luckily, plugin developers are more sensitive.
adam, do you have a specific plugin in mind?
personally, I use faux-ml, just because i have imported entries from wordpress.com, and the syntax is the same. for anything non-youtube, i use wp-swfobject.
try this: Viper’s Video Quicktags plugin
You have to watch which plugins you use for embedding as well since I have used most of them and they tend to break the RSS validation so they don’t work with the RSS widgets. Glad this is being sorted out.
I wonder why I’m not having the problem at teenymanolo.com? I’ve been OD’ing on YouTubes there lately.
Huh, I didn’t realize that difference in permissions from admin vs. other roles. Thanks, Lloyd, that’s good to know.
Thanks! It is good to know what I know - and that there is a fix coming. I like some things about the visual editor - like ease of positioning and resizing photos, but I mostly leave it turned off for quick embeds!