A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
Hi,
I'm creating an Editor Plug-in. The plug-in need to put som javascript in the editor, here is a part of my code:
function OnMovieDialogClosed(returnValue, callbackArguments)
{
var plugin = callbackArguments;
var sHTML = '';
var range = plugin.editorDocument.selection.createRange();
sHTML = "<SCRIPT type='text/javascript'>function test { }</SCRIPT><DIV id='moviePlugin'></DIV>";
range.pasteHTML(sHTML);
}
When I run this the only thing that ends up in the editor is the DIV, the SCRIPT part is ignored. Is there any way to do this? It is possible to put javascript code manually in the editor. I can't find any documentation on the editor API.
/Ola.