From ba9413eae5d20d9be288fa7e41783f33e92be54a Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Mon, 27 Sep 2021 09:31:59 -0500 Subject: [PATCH] initial commit, add hotkey definitions --- shared/naturalcrit/codeEditor/codeEditor.jsx | 24 +++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 9707bde56..fe63f7565 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -47,14 +47,18 @@ const CodeEditor = createClass({ indentWithTabs : true, tabSize : 2, extraKeys : { - 'Ctrl-B' : this.makeBold, - 'Cmd-B' : this.makeBold, - 'Ctrl-I' : this.makeItalic, - 'Cmd-I' : this.makeItalic, - 'Ctrl-M' : this.makeSpan, - 'Cmd-M' : this.makeSpan, - 'Ctrl-/' : this.makeComment, - 'Cmd-/' : this.makeComment + 'Ctrl-B' : this.makeBold, + 'Cmd-B' : this.makeBold, + 'Ctrl-I' : this.makeItalic, + 'Cmd-I' : this.makeItalic, + 'Ctrl-M' : this.makeSpan, + 'Cmd-M' : this.makeSpan, + 'Ctrl-/' : this.makeComment, + 'Cmd-/' : this.makeComment, + 'Ctrl-L' : this.makeUnOrderedList, + 'Cmd-L' : this.makeUnOrderedList, + 'Shift-Ctrl-L' : this.makeOrderedList, + 'Shift-Cmd-L' : this.makeOrderedList } }); @@ -99,6 +103,10 @@ const CodeEditor = createClass({ } }, + makeUnOrderedList : function() { + const selection = this.codeMirror.getSelection() + } + //=-- Externally used -==// setCursorPosition : function(line, char){ setTimeout(()=>{