diff --git a/src/static/js/ace.js b/src/static/js/ace.js index 26d6c0eb..600b6136 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -239,10 +239,6 @@ require.setGlobalKeyPath("require");\n\ iframeHTML.push(doctype); iframeHTML.push("
"); - hooks.callAll("aceInitInnerdocbodyHead", { - iframeHTML: iframeHTML - }); - // calls to these functions ($$INCLUDE_...) are replaced when this file is processed // and compressed, putting the compressed code from the named file directly into the // source here. @@ -277,6 +273,11 @@ require.setGlobalKeyPath("require");\n\ iframeHTML.push('<\/script>'); iframeHTML.push(''); + + hooks.callAll("aceInitInnerdocbodyHead", { + iframeHTML: iframeHTML + }); + iframeHTML.push(' '); // Expose myself to global for my child frame. diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 723d410f..cc9f1288 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -341,6 +341,11 @@ function Ace2Inner(){ return rep; }; + editorInfo.ace_getAuthor = function() + { + return thisAuthor; + } + var currentCallStack = null; function inCallStack(type, action) @@ -439,6 +444,14 @@ function Ace2Inner(){ try { result = action(); + + hooks.callAll('aceEditEvent', { + callstack: currentCallStack, + editorInfo: editorInfo, + rep: rep, + documentAttributeManager: documentAttributeManager + }); + //console.log("Just did action for: "+type); cleanExit = true; } @@ -522,6 +535,7 @@ function Ace2Inner(){ { return rep.lines.atOffset(charOffset).key; } + function dispose() {