execCommand insertHTML

I want create a WYSIWYG editor now I need a parameter for execCommand for inserting HTML code (for adding movie and swf file)

som editors like fckeditor how add movie and flash ?

Hi,

Taken from FreeRichTextEditor.com

rteName = “Name of your editor IFRAME”;
function rteInsertHTML(html) {
if (document.all) {
var oRng = document.getElementById(rteName).contentWindow.document.selection.createRange();
oRng.pasteHTML(html);
oRng.collapse(false);
oRng.select();
} else {
document.getElementById(rteName).contentWindow.document.execCommand(‘insertHTML’, false, html);
}
};

Works in all browsers that support contentEditable!

Kind Regards,
Steve
http://www.rtepad.com