X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a..d24dc26fdab9e62f120ea232302b754a2dc6d3e8:/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/text-editor-view.js 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);