Although this is an old topic, I ran across this issue for a client today and while searching for solutions, this forum post came up at the top of my google searches, so I figured I would post my solution here:
The first problem is that the img tag that is used as a tinymce substitute for the flash embed/object code needs to be a self-closing tag such as:
Code:
<img .... />
However, in the "setInnerHTML" method, assigning HTML to innerHTML:
Code:
e.innerHTML = h;
strips the closing slash, even if it is manually added via the HTML source editor. I didn't verify the reason, but I suspect that the custom attributes (such as mce_src) that are added to the img tag cause the javascript engine to fallback to a quirks-like mode that doesn't think this img tag is what it is and strips the closing slash, probably for compatibility reasons (I was using Firefox 3).
That ripples down to the media plug-in, which is where there is code that converts this img tag into an object/embed block of code that actually loads the flash. There is a line of code that looks for a self-closing type of tag (see plugins/media/editor_plugin.js):
Code:
endPos = content.indexOf('/>', startPos);
By removing the slash, the code is now able to find the end of the img tag, and can continue properly:
Code:
endPos = content.indexOf('>', startPos);
But that wasn't it for me, there was still one more problem, but I am not sure if it was unique to my situation. In order for the code in the media plug-in to even run, I had to add an extra case (see plugins/media/editor_plugin.js). Where the code was:
Code:
case "get_from_editor":
I changed it to:
Code:
case "get_from_editor":
case "submit_content":
I figure this last one is due to a version incompatibility between the plugin itself and the tinymce engine. Don't care enough to find out.
Hope this helps someone out there.
Mathieu Bouchard