aboutsummaryrefslogtreecommitdiffstats
path: root/infrastructure/ace
diff options
context:
space:
mode:
Diffstat (limited to 'infrastructure/ace')
-rw-r--r--infrastructure/ace/www/ace2_outer.js8
-rw-r--r--infrastructure/ace/www/domline.js2
-rw-r--r--infrastructure/ace/www/linestylefilter.js2
3 files changed, 10 insertions, 2 deletions
diff --git a/infrastructure/ace/www/ace2_outer.js b/infrastructure/ace/www/ace2_outer.js
index b0fc20c..e6d430d 100644
--- a/infrastructure/ace/www/ace2_outer.js
+++ b/infrastructure/ace/www/ace2_outer.js
@@ -14,6 +14,10 @@
* limitations under the License.
*/
+// requires: top
+// requires: plugins
+// requires: undefined
+
Ace2Editor.registry = { nextId: 1 };
@@ -163,6 +167,10 @@ function Ace2Editor() {
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
var iframeHTML = ["'"+doctype+"<html><head>'"];
+
+ top.plugins.callHook(
+ "aceInitInnerdocbodyHead", {iframeHTML:iframeHTML});
+
// these lines must conform to a specific format because they are passed by the build script:
iframeHTML.push($$INCLUDE_CSS_Q("editor.css syntax.css inner.css"));
//iframeHTML.push(INCLUDE_JS_Q_DEV("ace2_common_dev.js"));
diff --git a/infrastructure/ace/www/domline.js b/infrastructure/ace/www/domline.js
index 38cddf5..90e9943 100644
--- a/infrastructure/ace/www/domline.js
+++ b/infrastructure/ace/www/domline.js
@@ -101,7 +101,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) {
var extraOpenTags = "";
var extraCloseTags = "";
- ((top == undefined) ? plugins : top.plugins).callHook(
+ (function () { try { return top.plugins; } catch (e) { return plugins; }; })().callHook(
"aceCreateDomLine", {domline:domline, cls:cls}
).map(function (modifier) {
cls = modifier.cls;
diff --git a/infrastructure/ace/www/linestylefilter.js b/infrastructure/ace/www/linestylefilter.js
index d69376a..c163120 100644
--- a/infrastructure/ace/www/linestylefilter.js
+++ b/infrastructure/ace/www/linestylefilter.js
@@ -238,7 +238,7 @@ linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt) {
linestylefilter.getFilterStack = function(lineText, textAndClassFunc, browser) {
var func = linestylefilter.getURLFilter(lineText, textAndClassFunc);
- var hookFilters = ((top == undefined) ? plugins : top.plugins).callHook(
+ var hookFilters = (function () { try { return top.plugins; } catch (e) { return plugins; }; })().callHook(
"aceGetFilterStack", {linestylefilter:linestylefilter, browser:browser});
hookFilters.map(function (hookFilter) {
func = hookFilter(lineText, func);