X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a..5d173e99d3e906b49ba3bde59388083b120d4e21:/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);