From 5e674fe29e520adb12a2eaaf89b697f58d015904 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Fri, 10 Jan 2014 16:38:36 -0800 Subject: [PATCH] Add commonly used Editor methods to Editor View Mini-editors use these methods very often, but really we shouldn't need to do this. --- src/editor-view.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/editor-view.coffee b/src/editor-view.coffee index e618d08f7..8324b6e5e 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -220,6 +220,18 @@ class EditorView extends View getEditor: -> @editor + # {Delegates to: Editor.getText} + getText: -> + @editor.getText() + + # {Delegates to: Editor.setText} + setText: (text) -> + @editor.setText(text) + + # {Delegates to: Editor.insertText} + insertText: (text, options) -> + @editor.insertText(text, options) + # Private: setHeightInLines: (heightInLines)-> heightInLines ?= @calculateHeightInLines()