diff options
author | Chia-liang Kao <clkao@clkao.org> | 2013-06-15 01:37:41 +0800 |
---|---|---|
committer | Chia-liang Kao <clkao@clkao.org> | 2013-06-15 01:38:46 +0800 |
commit | f31db205dafd8a8711db583975b8b2aab568303a (patch) | |
tree | a744fffe021162ab0bb0966485cc86931bd83648 /src/static/js/ace.js | |
parent | 548f31a46a685860c73376261f39e502d680cedd (diff) | |
download | etherpad-lite-f31db205dafd8a8711db583975b8b2aab568303a.zip |
allow cssmanager to manage outer_ace
Diffstat (limited to 'src/static/js/ace.js')
-rw-r--r-- | src/static/js/ace.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/static/js/ace.js b/src/static/js/ace.js index 83ad9447..db0d596b 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -1,5 +1,5 @@ /** - * This code is mostly from the old Etherpad. Please help us to comment this code. + * This code is mostly from the old Etherpad. Please help us to comment this code. * This helps other people to understand this code better and helps them to improve it. * TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED */ @@ -86,7 +86,7 @@ function Ace2Editor() }); actionsPendingInit = []; } - + ace2.registry[info.id] = info; // The following functions (prefixed by 'ace_') are exposed by editor, but @@ -97,7 +97,7 @@ function Ace2Editor() 'applyChangesToBase', 'applyPreparedChangesetToBase', 'setUserChangeNotificationCallback', 'setAuthorInfo', 'setAuthorSelectionRange', 'callWithAce', 'execCommand', 'replaceRange']; - + _.each(aceFunctionsPendingInit, function(fnName,i){ var prefix = 'ace_'; var name = prefix + fnName; @@ -105,18 +105,18 @@ function Ace2Editor() info[prefix + fnName].apply(this, arguments); }); }); - + editor.exportText = function() { if (!loaded) return "(awaiting init)\n"; return info.ace_exportText(); }; - + editor.getFrame = function() { return info.frame || null; }; - + editor.getDebugProperty = function(prop) { return info.ace_getDebugProperty(prop); @@ -221,16 +221,16 @@ function Ace2Editor() // 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. - // these lines must conform to a specific format because they are passed by the build script: + // these lines must conform to a specific format because they are passed by the build script: var includedCSS = []; var $$INCLUDE_CSS = function(filename) {includedCSS.push(filename)}; $$INCLUDE_CSS("../static/css/iframe_editor.css"); $$INCLUDE_CSS("../static/css/pad.css"); $$INCLUDE_CSS("../static/custom/pad.css"); - + var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){ return '../static/plugins/' + path }); includedCSS = includedCSS.concat(additionalCSS); - + pushStyleTagsFor(iframeHTML, includedCSS); if (!Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) { @@ -304,16 +304,16 @@ window.onload = function () {\n\ $$INCLUDE_CSS("../static/css/iframe_editor.css"); $$INCLUDE_CSS("../static/css/pad.css"); $$INCLUDE_CSS("../static/custom/pad.css"); - - + + var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){ return '../static/plugins/' + path }); includedCSS = includedCSS.concat(additionalCSS); - + pushStyleTagsFor(outerHTML, includedCSS); // bizarrely, in FF2, a file with no "external" dependencies won't finish loading properly // (throbs busy while typing) - outerHTML.push('<link rel="stylesheet" type="text/css" href="data:text/css,"/>', scriptTag(outerScript), '</head><body id="outerdocbody"><div id="sidediv"><!-- --></div><div id="linemetricsdiv">x</div><div id="overlaysdiv"><!-- --></div></body></html>'); + outerHTML.push('<style type="text/css" title="dynamicsyntax"></style>', '<link rel="stylesheet" type="text/css" href="data:text/css,"/>', scriptTag(outerScript), '</head><body id="outerdocbody"><div id="sidediv"><!-- --></div><div id="linemetricsdiv">x</div><div id="overlaysdiv"><!-- --></div></body></html>'); var outerFrame = document.createElement("IFRAME"); outerFrame.name = "ace_outer"; |