__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 = {};
}
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);