From: Michael Tremer Date: Tue, 27 Aug 2019 13:53:31 +0000 (+0100) Subject: wiki: editor: Initialise selection with some data X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8eff1fbe071433fbf62d3553d3893a07bdf2f668;p=ipfire.org.git wiki: editor: Initialise selection with some data Signed-off-by: Michael Tremer --- 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();