mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 07:58:04 +03:00
Add commonly used Editor methods to Editor View
Mini-editors use these methods very often, but really we shouldn't need to do this.
This commit is contained in:
parent
c19c8c5341
commit
5e674fe29e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user