function Ok() {
// Just a sample of the YouTube video ID that is entered into the dialog via the embed code or url
var videoId = 'RXJKdh1KZ0w';
oEditor.FCKUndo.SaveUndoStep();
var toInsert = '';
toInsert += '<param name="movie" value="http://www.youtube.com/v/' + videoId + '&hl=en"></param>';
toInsert += '<param name="wmode" value="transparent"></param>';
toInsert += '<embed src="http://www.youtube.com/v/' + videoId + '&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>';
if (!oObject) {
oObject = FCK.EditorDocument.createElement('OBJECT');
oObject.innerHTML = toInsert;
oFakeImage = null;
}
if (!oFakeImage) {
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage('FCK__UnknownObject', oObject);
oFakeImage.style.height = '355';
oFakeImage.style.width = '425';
oFakeImage.style.border = '1px solid black';
oFakeImage.style.background = 'center center url("' + FCK.Plugins.Items['youtube'].Path + 'youtube_logo.png' + '") no-repeat';
oFakeImage = FCK.InsertElement(oFakeImage);
}
return true;
}
var param1 = FCK.EditorDocument.createElement('PARAM');
SetAttribute(param1, "name", "movie");
SetAttribute(param1, "value", "http://www.youtube.com/v/" + videoId + "&hl=en");
var param2 = FCK.EditorDocument.createElement('PARAM');
SetAttribute(param2, "name", "wmode");
SetAttribute(param2, "value", "transparent");
var embed = FCK.EditorDocument.createElement('EMBED');
SetAttribute(embed, "src", "http://www.youtube.com/v/" + videoId + "&hl=en");
SetAttribute(embed, "type", "application/x-shockwave-flash");
SetAttribute(embed, "wmode", "transparent");
SetAttribute(embed, "width", 425);
SetAttribute(embed, "height", 355);
el.appendChild(param1);
el.appendChild(param2);
el.appendChild(embed);
Re: [Plugin] YouTube plugin problems with IE
Based on that idea, and the need to use this plugin for the flash objects that are in reality movies (instead of being handled by the default flash command), my idea about this kind of plugin was to generate a script block that with the help of SwfObject inserts the code and with a comment it's easy to recognize that the code is related to this plugin (see the GoogleMaps plugin).
Re: [Plugin] YouTube plugin problems with IE
Have you been able to make this plugin work? Is it available anywhere?
Re: [Plugin] YouTube plugin problems with IE
Thanks again for your help and suggestions.
Re: [Plugin] YouTube plugin problems with IE
Hey Teddy,
Any luck and/or desire to post what you've gotten working?
(Of course, would be great if, like another WYSWYG there were simply a button we could add to add YouTube... But, I digress.)
Re: [Plugin] YouTube plugin problems with IE
Re: [Plugin] YouTube plugin problems with IE
No problem, I completely understand. In fact it's been a long time since I've been back as well! As for the embed, you're right - it works great. Unfortunately, my users don't quite get source code and a wrapper would be wonderful - if anyone would like to take on the challenge?
Re: [Plugin] YouTube plugin problems with IE
Re: [Plugin] YouTube plugin problems with IE