diff options
author | Wu Cheng-Han | 2016-01-17 14:28:04 -0600 |
---|---|---|
committer | Wu Cheng-Han | 2016-01-17 14:28:04 -0600 |
commit | eaa8ccaccb1091820d0a8d1223996a6dd057347d (patch) | |
tree | 6b4aaa3b3d1a2fed68147510142663222533775a /public/js/index.js | |
parent | ce65e58096d57ace02723d11a125673f9d48c293 (diff) |
Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor
Diffstat (limited to 'public/js/index.js')
-rw-r--r-- | public/js/index.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js index 9329d38a..c35c2c38 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -6,6 +6,12 @@ var version = '0.3.3'; var defaultTextHeight = 20; var viewportMargin = 20; var defaultExtraKeys = { + "F11": function(cm) { + cm.setOption("fullScreen", !cm.getOption("fullScreen")); + }, + "Esc": function(cm) { + if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); + }, "Cmd-S": function () { return CodeMirror.PASS }, @@ -237,6 +243,7 @@ var editor = CodeMirror.fromTextArea(textit, { flattenSpans: true, addModeClass: true, readOnly: true, + autoRefresh: true, placeholder: "← Start by enter title here\n===\nVisit /features if you don't know what to do.\nHappy hacking :)" }); var inlineAttach = inlineAttachment.editors.codemirror4.attach(editor); |