RichTextNode

One item of inline content: a text run, a bound expression, or a micronode such as bold or link.

@internote/canvas-sdkInterface
On 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

attributes
A micronode's attributes, such as a link's href.
Array<{ identifier: string; value: unknown }>
body
A micronode's body: nested inline content, or a plain string.
RichTextNode[] | string
content
A text run's text.
string
identifier
The micronode's kind, such as bold, latex or footnote.
string
isBlockBreak
Whether the node marks the break between two paragraphs.
boolean
isBlockEquation
Whether a latex node came from $$…$$, a display equation.
boolean
isList
Whether the node is a list, whose items are in listItems.
boolean
listItems
A list's items, each its own inline content.
RichTextNode[][]
listType
Whether a list is bulleted or numbered.
ulol
type
'text' for a text run; 'expression' for a bound expression; absent for a micronode.
string

Declared in packages/canvas-sdk/src/content/types.ts:29.

Last updated