MCPcopy
hub / github.com/basecamp/trix / fromString

Method fromString

src/trix/models/document.js:18–21  ·  view source on GitHub ↗
(string, textAttributes)

Source from the content-addressed store, hash-verified

16 }
17
18 static fromString(string, textAttributes) {
19 const text = Text.textForStringWithAttributes(string, textAttributes)
20 return new this([ new Block(text) ])
21 }
22
23 constructor(blocks = []) {
24 super(...arguments)

Callers 1

document_test.jsFile · 0.80

Calls 1

Tested by

no test coverage detected