mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Assign attributes passed to TextEditorView constructor
This commit is contained in:
@@ -51,7 +51,7 @@ class TextEditorView extends View
|
||||
if modelOrParams instanceof TextEditor
|
||||
model = modelOrParams
|
||||
else
|
||||
{editor, mini, placeholderText} = modelOrParams
|
||||
{editor, mini, placeholderText, attributes} = modelOrParams
|
||||
model = editor ? new TextEditor
|
||||
buffer: new TextBuffer
|
||||
softWrapped: false
|
||||
@@ -62,6 +62,7 @@ class TextEditorView extends View
|
||||
|
||||
element = new TextEditorElement
|
||||
element.lineOverdrawMargin = props?.lineOverdrawMargin
|
||||
element.setAttribute(name, value) for name, value of attributes if attributes?
|
||||
element.setModel(model)
|
||||
return element.__spacePenView
|
||||
|
||||
|
||||
Reference in New Issue
Block a user