Patch Realtime into CodeMirror in CryptPad

pull/1/head
Yann Flory 9 years ago
parent 32f44161a7
commit 9a932a3f56

@ -7,7 +7,6 @@
<link rel="stylesheet" href="codemirror.css">
<link rel="stylesheet" href="codemirror-5.7/addon/dialog/dialog.css">
<link rel="stylesheet" href="codemirror-5.7/addon/fold/foldgutter.css" />
<link rel="stylesheet" href="codemirror-5.7/mode/javascript/javascript.css" />
<script src="codemirror-5.7/mode/javascript/javascript.js"></script>
<script src="codemirror-5.7/addon/edit/closebrackets.js"></script>
<script src="codemirror-5.7/addon/edit/matchbrackets.js"></script>

@ -9,8 +9,6 @@ define([
var $ = window.jQuery;
var ifrw = $('#pad-iframe')[0].contentWindow;
var CMeditor = ifrw.CodeMirror;
console.log(CMeditor);
var Ckeditor = ifrw.CKEDITOR;
$(function () {
$(window).on('hashchange', function() {
@ -33,8 +31,7 @@ define([
extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }},
foldGutter: true,
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
mode: "javascript",
mode: "javascript"
});
editor.setValue(Messages.codeInitialState);

@ -31,5 +31,14 @@ define(function () {
'</p>',
].join('');
out.codeInitialState = [
'/*\n',
'This is CryptPad, the zero knowledge realtime collaborative editor.\n',
'What you type here is encrypted so only people who have the link can access it.\n',
'Even the server cannot see what you type.\n',
'What you see here, what you hear here, when you leave here, let it stay here\n',
'*/'
].join('');
return out;
});

Loading…
Cancel
Save