This question is locked. New answers and comments are not allowed.
The functionality of the inserthtml is inconsistent.
I have attached a sample project which demonstrate this issue.
I have a custom action which inserts a html object (a youtube clip) into the editor.
On all three browsers, the html is inserted but there in consistency between the browsers:
on firefox the video placeholder is not shown and you cannot tell if it has worked or not.
On IE you get a black box (which is an acceptable compromise) showing you where the video will be.
On chrome works fine and you get a picture of the video.
I am using jquery 1.6.1 but this issue is also present when i use jquery 1.5.1.
Can we get firefox to behave like IE for Firefox (quite rare for something not to work in firefox but work in the other browsers).
Below is the code that inserts the html
I have attached a sample project which demonstrate this issue.
I have a custom action which inserts a html object (a youtube clip) into the editor.
On all three browsers, the html is inserted but there in consistency between the browsers:
on firefox the video placeholder is not shown and you cannot tell if it has worked or not.
On IE you get a black box (which is an acceptable compromise) showing you where the video will be.
On chrome works fine and you get a picture of the video.
I am using jquery 1.6.1 but this issue is also present when i use jquery 1.5.1.
Can we get firefox to behave like IE for Firefox (quite rare for something not to work in firefox but work in the other browsers).
Below is the code that inserts the html
// Setup the command. function RadEditor_YouTube(e) { var evt = $.Event(e); evt.stopPropagation(); evt.preventDefault(); var editor = $(this).parents('table').data('tEditor'); var url = window.prompt("Please enter the address of the YouTube clip:", ""); if ((url != null) && (url.length > 0)) { var xhtml = CreateYouTubeXhtml(url); if (xhtml == null) { window.alert("\"" + url + "\" is not a valid YouTube address."); } else { editor.focus(); editor.exec('insertHtml', { value: xhtml }); } } } // Function to turn a URL into a blob of XHTML for an embedded clip. function CreateYouTubeXhtml(url) { // Regex to pull out the identifier from the URL. var linkRegex = new RegExp("v=([^&]+)", "i"); var match = linkRegex.exec(url); if (match == null) { return null; } return "<object width=\"425\" height=\"344\">" + "<param name=\"movie\" value=\"http://www.youtube.com/v/" + match[1] + "&hl=en_GB&fs=1\"></param>" + "<param name=\"allowFullScreen\" value=\"true\"></param>" + "<embed src=\"http://www.youtube.com/v/" + match[1] + "&hl=en_GB&fs=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed>" + "</object>" }