Include pesticide.js if exists, doPesticide on key

This commit is contained in:
Matt Pass
2014-06-12 16:54:09 +01:00
parent 40fbc83547
commit 2624469d61

View File

@@ -26,6 +26,10 @@ addon: brace-fold, closetag, css-hint, html-hint, javascript-hint, javascript-li
if (file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) {
echo '<script src="plugins/emmet/emmet.min.js"></script>';
};?>
<?php
if (file_exists(dirname(__FILE__)."/plugins/pesticide/pesticide.js")) {
echo '<script src="plugins/pesticide/pesticide.js"></script>';
};?>
<link rel="stylesheet" href="<?php
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
$activeLineBG = array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","neat","solarized","xq-light")) !== false ? "#ccc" : "#000";
@@ -268,6 +272,8 @@ function createNewCMInstance(num) {
top.ICEcoder.previewWindow.document.documentElement.appendChild(style);
}
}
// Do the pesticide plugin if it exists
try {top.ICEcoder.doPesticide();} catch(err) {};
}
}
);