summaryrefslogtreecommitdiff
path: root/src/static/js/ace.js
diff options
context:
space:
mode:
authorMartyn York <etinquis@gmail.com>2012-04-18 14:44:25 -0700
committerMartyn York <etinquis@gmail.com>2012-04-18 14:44:25 -0700
commitda75b87d3c90ecd27dfe9d1f8b583e9db38de7a7 (patch)
treea64076d19ff22617f6646faa295cfedb866db846 /src/static/js/ace.js
parent7ede4872b1f4be142c4c21df350809f863bcee1d (diff)
downloadetherpad-lite-da75b87d3c90ecd27dfe9d1f8b583e9db38de7a7.zip
added new hook 'acePostWriteDomLineHTML' which gets called after a domline is created and has been added to the page. Also fixed problems with ReferenceExceptions due to require-kernel not being sent to the iframe.
Diffstat (limited to 'src/static/js/ace.js')
-rw-r--r--src/static/js/ace.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/static/js/ace.js b/src/static/js/ace.js
index 6ea2938b..85801d33 100644
--- a/src/static/js/ace.js
+++ b/src/static/js/ace.js
@@ -167,7 +167,13 @@ require.setGlobalKeyPath("require");\n\
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
buffer.push(KERNEL_BOOT);
buffer.push('<\/script>');
- }
+ } else {
+ file = KERNEL_SOURCE;
+ buffer.push('<script type="application/javascript" src="' + KERNEL_SOURCE + '"><\/script>');
+ buffer.push('<script type="text/javascript">');
+ buffer.push(KERNEL_BOOT);
+ buffer.push('<\/script>');
+ }
}
function pushScriptsTo(buffer) {
/* Folling is for packaging regular expression. */