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-sdkInterface
On this page
import { RichTextOptions } from '@internote/canvas-sdk';

Each renderer left out falls back to a self-contained rendering.

#Fields

animation
The 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.
InlineCueClock
context
Where the text is shown, which picks the context variant of some classes.
narrativecanvas
renderCitation
Renders 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.ReactNode
renderFootnote
Renders a footnote node. The fallback is an underlined trigger with a native title tooltip.
(args: RichTextFootnoteArgs) => React.ReactNode
renderInternoteRef
Renders 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.

Last updated