From ab2900cadf2271f0c27dfbba9890bd271601b4e6 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 5 Oct 2021 20:24:45 +1300 Subject: [PATCH] Expose CodeMirror functions in codeEditor.jsx --- shared/naturalcrit/codeEditor/codeEditor.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 9cf4fe0e2..6fe189890 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -114,10 +114,13 @@ const CodeEditor = createClass({ this.codeMirror.refresh(); }, redo : function(){ - this.codeMirror.redo(); + return this.codeMirror.redo(); }, undo : function(){ - this.codeMirror.undo(); + return this.codeMirror.undo(); + }, + historySize : function(){ + return this.codeMirror.doc.historySize(); }, //----------------------//