diff options
author | Chad Weider <cweider@oofn.net> | 2012-05-14 19:01:00 -0700 |
---|---|---|
committer | Chad Weider <cweider@oofn.net> | 2012-05-14 19:01:00 -0700 |
commit | a9eb2d4e319b8c796d66c00634081aa9a0715265 (patch) | |
tree | ec0e4b4ce1c513081a81a6a352e704d2bb5ecc48 /src/static/js/ace.js | |
parent | 9b0e2287aa714ce41f3af71c555ec505855be186 (diff) | |
download | etherpad-lite-a9eb2d4e319b8c796d66c00634081aa9a0715265.zip |
Fix ordering of editer code loading operations.
Diffstat (limited to 'src/static/js/ace.js')
-rw-r--r-- | src/static/js/ace.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/static/js/ace.js b/src/static/js/ace.js index f3a27a11..8cb9f188 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -185,14 +185,10 @@ require.setGlobalKeyPath("require");\n\ buffer.push('<script type="text/javascript">'); buffer.push(Ace2Editor.EMBEDED[ACE_SOURCE]); buffer.push(Ace2Editor.EMBEDED[ACE_COMMON]); - buffer.push('require("ep_etherpad-lite/static/js/ace2_inner");'); buffer.push('<\/script>'); } else { buffer.push('<script type="application/javascript" src="' + ACE_SOURCE + '"><\/script>'); buffer.push('<script type="application/javascript" src="' + ACE_COMMON + '"><\/script>'); - buffer.push('<script type="text/javascript">'); - buffer.push('require("ep_etherpad-lite/static/js/ace2_inner");'); - buffer.push('<\/script>'); } } function pushStyleTagsFor(buffer, files) { @@ -264,8 +260,9 @@ require.setGlobalKeyPath("require");\n\ pushStyleTagsFor(iframeHTML, includedCSS); var includedJS = []; - var $$INCLUDE_JS = function(filename) {includedJS.push(filename)}; pushRequireScriptTo(iframeHTML); + pushScriptsTo(iframeHTML); + // Inject my plugins into my child. iframeHTML.push('\ <script type="text/javascript">\ @@ -280,7 +277,10 @@ require.setGlobalKeyPath("require");\n\ });\ </script>\ '); - pushScriptsTo(iframeHTML); + + iframeHTML.push('<script type="text/javascript">'); + iframeHTML.push('require("ep_etherpad-lite/static/js/ace2_inner");'); + iframeHTML.push('<\/script>'); iframeHTML.push('<style type="text/css" title="dynamicsyntax"></style>'); iframeHTML.push('</head><body id="innerdocbody" class="syntax" spellcheck="false"> </body></html>'); |