mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor
This commit is contained in:
parent
ce65e58096
commit
eaa8ccaccb
381 changed files with 6726 additions and 2636 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue