mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 23:48:05 +03:00
Allow setting editor text content in HTML
This commit is contained in:
parent
d87d98278e
commit
4afe133f85
@ -20,6 +20,11 @@ describe "TextEditorElement", ->
|
||||
element = jasmineContent.firstChild
|
||||
expect(element.getModel().getPlaceholderText()).toBe 'testing'
|
||||
|
||||
it "honors the text content", ->
|
||||
jasmineContent.innerHTML = "<atom-text-editor>testing</atom-text-editor>"
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user