@mocanvas/mocanvas · constant
declare const richTextValidator: Validator<RichText>A rich-text document, as a shape's richText prop holds it.
Structural rather than exhaustive: the document is TipTap-shaped JSON whose
node vocabulary is open (an app may register its own nodes and marks), so
validating the node types would reject a document a newer editor wrote. What
has to hold is that it is a doc with a content array — everything the
text pipeline dereferences.
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.