I have a page with FCKEditor on it. I have installed the "Embed Video" plugin on it.
When I view this page in any browser (IE, Chrome, Opera, Safari) and embed a youtube video link it previews just fine, but the preview doesn't show up in FireFox!
The HTML generated is as follows:
<iframe frameborder="0" style="width: 100%; height: 100%;">
<html dir="rtl">
<head>
<!-- Lots of FCK Scripts and Styles -->
</head>
<body spellcheck="false">
<object height="225px" width="300px">
<param name="movie" value="http://www.youtube.com/v/kecWETS1Zck&feature">
<param name="allowFullScreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="wmode" value="transparent">
<embed height="225" width="300" src="http://www.youtube.com/v/kecWETS1Zck&feature" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" allowfullscreen="true">
<noembed>Download movie: &lt;A HREF="http://www.youtube.com/v/kecWETS1Zck&amp;feature"&gt;http://www.youtube.com/watch?v=kecWETS1Zck&amp;feature=g-logo&lt;/A&gt;</noembed>
</object><p><br type="_moz"></p>
</body>
</html>
</iframe>
I don't understand why this happening in FF only?
OK, I found the solution to this.
Firstly, its an inherent FF issue. FF does not show preview of object or embed tags from inside of an iframe.
There is a built in JS class in FCKEditor by the name FCKEmbedAndObjectProcessor
it has a RefreshView
function that takes a place holder element (e.g. an img tag and the original embed/object element) and does a replacement so as to show something in the browser canvas.
It automatically saves the embed tag which you can later retrieve by using fckEditor.UpdateLinkedField()
method.