]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/static/js/editor.js
wiki: editor: Initialise selection with some data
[ipfire.org.git] / src / static / js / editor.js
index 148eb69a0e064efe087bad88be8c6ef57d629dd4..11be2666f6f33dbf6f85e123c6afcb24a96e9ce2 100644 (file)
@@ -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();