pasteHTML removes markup
- by ullmark
I am writing a plugin to an old IE-only WYSIWYG-editor which resides in an old CMS. I've created a plugin that opens an popup where the user kan enter the url of an youtube clip.
The popup then creates the corrent <object..><param..> markup for the embed and uses Internet Explorers pasteHTML function;
var range = plugin.editorDocument.selection.createRange();
var embedHtml = OpenDialog(dialogUrl, null, 400, 200);
if (!embedHtml) {
return;
}
range.pasteHTML(embedHtml);
I know it's missing a bit of information about some of the variables but you get the picture. The problem is that the <param>-tags gets removed when i run the pasteHTML. I wonder if anyone have an idea of fixing this, and letting me keep my param-tags