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

Method textForStringWithAttributes

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

Source from the content-addressed store, hash-verified

16 }
17
18 static textForStringWithAttributes(string, attributes) {
19 const piece = new StringPiece(string, attributes)
20 return new this([ piece ])
21 }
22
23 static fromJSON(textJSON) {
24 const pieces = Array.from(textJSON).map((pieceJSON) => Piece.fromJSON(pieceJSON))

Callers 12

insertStringMethod · 0.80
setTextAttributeMethod · 0.80
consolidateWithMethod · 0.80
block.jsFile · 0.80
fromStringMethod · 0.80
block_test.jsFile · 0.80
createDocumentFunction · 0.80
fixtures.jsFile · 0.80
trix.jsFile · 0.80
consolidateWithMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected