pasteHTML removes markup
Posted
by ullmark
on Stack Overflow
See other posts from Stack Overflow
or by ullmark
Published on 2010-04-16T14:19:06Z
Indexed on
2010/04/16
14:23 UTC
Read the original article
Hit count: 345
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
© Stack Overflow or respective owner