Fix syntax highlighting
This commit is contained in:
@@ -42,7 +42,7 @@ define([
|
||||
Cryptpad.errorLoadingScreen(Messages.websocketError);
|
||||
};
|
||||
|
||||
var andThen = function (CMeditor) {
|
||||
var andThen = function () {
|
||||
var $iframe = $('#pad-iframe').contents();
|
||||
var $contentContainer = $iframe.find('#editorContainer');
|
||||
var $previewContainer = $iframe.find('#previewContainer');
|
||||
@@ -58,7 +58,7 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
var CodeMirror = Cryptpad.createCodemirror(CMeditor, ifrw, Cryptpad);
|
||||
var CodeMirror = Cryptpad.createCodemirror(ifrw, Cryptpad);
|
||||
$iframe.find('.CodeMirror').addClass('fullPage');
|
||||
editor = CodeMirror.editor;
|
||||
|
||||
@@ -430,9 +430,9 @@ define([
|
||||
|
||||
var interval = 100;
|
||||
|
||||
var second = function (CM) {
|
||||
var first = function () {
|
||||
Cryptpad.ready(function () {
|
||||
andThen(CM);
|
||||
andThen();
|
||||
Cryptpad.reportAppUsage();
|
||||
});
|
||||
Cryptpad.onError(function (info) {
|
||||
@@ -442,17 +442,6 @@ define([
|
||||
});
|
||||
};
|
||||
|
||||
var first = function () {
|
||||
if (ifrw.CodeMirror) {
|
||||
// it exists, call your continuation
|
||||
second(ifrw.CodeMirror);
|
||||
} else {
|
||||
console.log("CodeMirror was not defined. Trying again in %sms", interval);
|
||||
// try again in 'interval' ms
|
||||
setTimeout(first, interval);
|
||||
}
|
||||
};
|
||||
|
||||
first();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user