@mocanvas/mocanvas · function
declare function renderPlaintextFromRichText(_editor: Editor, richText: RichTextSource): stringA rich-text document as plain text.
Formatting is dropped, structure is not: a hard break and a block boundary both become a newline, so the result has the same number of lines the label shows.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.