From 8eff1fbe071433fbf62d3553d3893a07bdf2f668 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 27 Aug 2019 14:53:31 +0100 Subject: [PATCH] wiki: editor: Initialise selection with some data Signed-off-by: Michael Tremer --- src/static/js/editor.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/static/js/editor.js b/src/static/js/editor.js index 148eb69a..11be2666 100644 --- a/src/static/js/editor.js +++ b/src/static/js/editor.js @@ -5,6 +5,14 @@ class Editor { // Get the textarea this.textarea = this.parent.find("textarea"); + // Initialise selection + this.selection = { + start : 0, + end : 0, + text : "", + length : 0, + }; + // Make the textarea magic this.activateTextArea(); -- 2.47.2