You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
995 B

<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../../core/jsml.xsd">
<execute>
<![CDATA[
plugin.Execute=function(element,arg1,arg2)
{
var option={width:436,height:380}
option.plugin=plugin;
editor.ShowXmlDialog("{folder}server/syntaxhighlighter.xml?{timems}",option);
}
function InsertToDoc(doc)
{
var link=doc.createElement("link");
link.setAttribute("rel","stylesheet");
link.setAttribute("href",editor._config.folder+"plugins/{plugin}/syntaxhighlighter.css");
doc.getElementsByTagName("head")[0].appendChild(link);
}
function InitPreview(editor,e)
{
InsertToDoc(e.Arguments[0]);
}
function InsertCss()
{
InsertToDoc(editor.GetWindow().document);
}
InsertCss();
editor.AttachEvent("InitPreview",InitPreview);
editor.AttachEvent("InitEvent",InsertCss);
]]>
</execute>
</jsml>