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

Method toSerializableDocument

src/trix/models/document.js:756–760  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

754 }
755
756 toSerializableDocument() {
757 const blocks = []
758 this.blockList.eachObject((block) => blocks.push(block.copyWithText(block.text.toSerializableText())))
759 return new this.constructor(blocks)
760 }
761
762 toString() {
763 return this.blockList.toString()

Callers 4

serialization.jsFile · 0.80
trix.jsFile · 0.80

Calls 3

eachObjectMethod · 0.80
toSerializableTextMethod · 0.80
copyWithTextMethod · 0.45

Tested by

no test coverage detected