From 2b678c1f129abde7e20f471018c55626f57cae97 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sat, 8 Oct 2016 23:03:33 +0800 Subject: [PATCH] Make editor variable global --- public/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/index.js b/public/js/index.js index 3801eea..d84d0a8 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -464,7 +464,7 @@ var fileTypes = { //editor settings var textit = document.getElementById("textit"); if (!textit) throw new Error("There was no textit area!"); -var editor = CodeMirror.fromTextArea(textit, { +window.editor = CodeMirror.fromTextArea(textit, { mode: 'gfm', backdrop: 'gfm', keyMap: "sublime",