RichTextOptions
How renderRichText renders: where the text is shown, and the host's own renderers for the nodes that need the host's data.
@internote/canvas-sdkimport { RichTextOptions } from '@internote/canvas-sdk';Each renderer left out falls back to a self-contained rendering.
#Fields
animationThe scene's clock, which an inline
!cue.highlight is timed against: the runtime a blank renderer is given. Left out, the highlighted words render as plain text.InlineCueClockcontextWhere the text is shown, which picks the context variant of some classes.
narrativecanvasrenderCitationRenders a
cite marker. The number it shows comes from the document's citations, which the renderer cannot see. The fallback is a raised dot.(args: RichTextCitationArgs) => React.ReactNoderenderFootnoteRenders a
footnote node. The fallback is an underlined trigger with a native title tooltip.(args: RichTextFootnoteArgs) => React.ReactNoderenderInternoteRefRenders a cross-reference to another document, given its id. The fallback is a plain link to
/{id}.(id: string | undefined, key: React.Key) => React.ReactNode#Example
renderRichText(items, {
context: 'canvas',
renderFootnote: ({ content, note, key }) => <Popover key={key} note={note}>{content}</Popover>,
})Declared in packages/canvas-sdk/src/content/types.ts:91.