From 9a932a3f5616e7b6d089cffa2a5d4f1d49d70d73 Mon Sep 17 00:00:00 2001 From: Yann Flory Date: Wed, 25 Nov 2015 10:09:23 +0100 Subject: [PATCH] Patch Realtime into CodeMirror in CryptPad --- www/code/inner.html | 1 - www/code/main.js | 5 +---- www/common/messages.js | 9 +++++++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/www/code/inner.html b/www/code/inner.html index 22e3d11e5..bc9cdbed5 100644 --- a/www/code/inner.html +++ b/www/code/inner.html @@ -7,7 +7,6 @@ - diff --git a/www/code/main.js b/www/code/main.js index 8227fbbf7..897f33c61 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -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); diff --git a/www/common/messages.js b/www/common/messages.js index 1ae8b77e8..e3951786c 100644 --- a/www/common/messages.js +++ b/www/common/messages.js @@ -31,5 +31,14 @@ define(function () { '

', ].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; });