RichTextNode
One item of inline content: a text run, a bound expression, or a micronode such as bold or link.
@internote/canvas-sdkOn this page
import { RichTextNode } from '@internote/canvas-sdk';renderRichText renders text runs, expressions and micronodes; it renders nothing for a list or a block break, and a block equation renders inline.
#Fields
attributesA micronode's attributes, such as a link's
href.Array<{ identifier: string; value: unknown }>bodyA micronode's body: nested inline content, or a plain string.
RichTextNode[] | stringcontentA text run's text.
stringidentifierThe micronode's kind, such as
bold, latex or footnote.stringisBlockBreakWhether the node marks the break between two paragraphs.
booleanisBlockEquationWhether a
latex node came from $$…$$, a display equation.booleanisListWhether the node is a list, whose items are in
listItems.booleanlistItemsA list's items, each its own inline content.
RichTextNode[][]listTypeWhether a list is bulleted or numbered.
uloltype'text' for a text run; 'expression' for a bound expression; absent for a micronode.stringDeclared in packages/canvas-sdk/src/content/types.ts:29.