diff options
| author | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
| commit | 455f099b504ec07dd492ab31987ae05a6f6774c7 (patch) | |
| tree | 22b0c7fd8e492733b97e661750a2d79c46da451d /atom/packages/ex-mode/node_modules/atom-space-pen-views/lib | |
| parent | 24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a (diff) | |
Adds atom packages
Diffstat (limited to 'atom/packages/ex-mode/node_modules/atom-space-pen-views/lib')
| -rw-r--r-- | atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/text-editor-view.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/text-editor-view.js b/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/text-editor-view.js index e957a2b..8aecdaf 100644 --- a/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/text-editor-view.js +++ b/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/text-editor-view.js @@ -9,11 +9,11 @@ __extends(TextEditorView, _super); function TextEditorView(params) { - var attributes, mini, name, placeholderText, value; + var attributes, editor, mini, name, placeholderText, value; if (params == null) { params = {}; } - mini = params.mini, placeholderText = params.placeholderText, attributes = params.attributes; + mini = params.mini, placeholderText = params.placeholderText, attributes = params.attributes, editor = params.editor; if (attributes == null) { attributes = {}; } @@ -23,7 +23,11 @@ if (placeholderText != null) { attributes['placeholder-text'] = placeholderText; } - this.element = document.createElement('atom-text-editor'); + if (editor != null) { + this.element = atom.views.getView(editor); + } else { + this.element = document.createElement('atom-text-editor'); + } for (name in attributes) { value = attributes[name]; this.element.setAttribute(name, value); |