Skip to content

Commit

Permalink
fix: not working shortcut of codemirror in markdown editor (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
seonim-ryu authored Apr 28, 2020
1 parent dbfe807 commit 11016ef
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions apps/editor/src/js/codeMirrorExt.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,20 @@ class CodeMirrorExt {

this.editorContainerEl.appendChild(cmTextarea);

options = extend(
{
lineWrapping: true,
theme: 'default',
extraKeys: {
'Shift-Tab': 'indentLess',
'Alt-Up': 'replaceLineTextToUpper',
'Alt-Down': 'replaceLineTextToLower'
},
indentUnit: 4,
cursorScrollMargin: 12,
specialCharPlaceholder: () => document.createElement('span')
options = {
...options,
lineWrapping: true,
theme: 'default',
extraKeys: {
...options.extraKeys,
'Shift-Tab': 'indentLess',
'Alt-Up': 'replaceLineTextToUpper',
'Alt-Down': 'replaceLineTextToLower'
},
options
);
indentUnit: 4,
cursorScrollMargin: 12,
specialCharPlaceholder: () => document.createElement('span')
};

this.cm = CodeMirror.fromTextArea(cmTextarea, options);
}
Expand Down

0 comments on commit 11016ef

Please sign in to comment.