diff --git a/spec/text-editor-element-spec.coffee b/spec/text-editor-element-spec.coffee index 78e317088..18143ebb9 100644 --- a/spec/text-editor-element-spec.coffee +++ b/spec/text-editor-element-spec.coffee @@ -20,6 +20,11 @@ describe "TextEditorElement", -> element = jasmineContent.firstChild expect(element.getModel().getPlaceholderText()).toBe 'testing' + it "honors the text content", -> + jasmineContent.innerHTML = "testing" + element = jasmineContent.firstChild + expect(element.getModel().getText()).toBe 'testing' + describe "when the model is assigned", -> it "adds the 'mini' attribute if .isMini() returns true on the model", -> element = new TextEditorElement diff --git a/src/text-editor-element.coffee b/src/text-editor-element.coffee index 558599150..790ac8529 100644 --- a/src/text-editor-element.coffee +++ b/src/text-editor-element.coffee @@ -86,7 +86,7 @@ class TextEditorElement extends HTMLElement buildModel: -> @setModel(new TextEditor( - buffer: new TextBuffer + buffer: new TextBuffer(@textContent) softWrapped: false tabLength: 2 softTabs: true