@mocanvas/mocanvas · interface

RichTextNodeExtension

interface RichTextNodeExtension extends RichTextExtension

A node type mocanvas knows how to render, measure and export.


Properties · 5

readonly emptyHtml?: string

Rendered inside the tag when the node has no content, so an empty block still occupies a line.

readonly kind: "node"
readonly tag: string | null

HTML tag the node serializes to. null renders the children with no wrapper.

readonly tagFor?: (node: RichTextNode) => string | null

Per-node tag, for a type whose tag depends on its attrs (a heading's level).

readonly void?: boolean

Void nodes (<br>, <hr>) render no children and no closing tag.

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.