mirror of
https://github.com/atom/atom.git
synced 2026-02-11 23:25:03 -05:00
Add a getModel method to editors' hidden input component
...to make it easy to access the editor in response to DOM events or when using document.activeElement. Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
31eb91c0a7
commit
5a45461d60
@@ -72,6 +72,10 @@ class TextEditorComponent
|
||||
|
||||
@hiddenInputComponent = new InputComponent
|
||||
@scrollViewNode.appendChild(@hiddenInputComponent.getDomNode())
|
||||
# Add a getModel method to the hidden input component to make it easy to
|
||||
# access the editor in response to DOM events or when using
|
||||
# document.activeElement.
|
||||
@hiddenInputComponent.getDomNode().getModel = => @editor
|
||||
|
||||
@linesComponent = new LinesComponent({@presenter, @domElementPool, @assert, @grammars, @views})
|
||||
@scrollViewNode.appendChild(@linesComponent.getDomNode())
|
||||
|
||||
Reference in New Issue
Block a user