tuil
ReferenceComponentsLogs, JSON, and diffs

MarkdownViewerProps

MarkdownViewerProps component contract.

View rawEdit

Type

export interface MarkdownViewerProps {
  readonly source: string;
  readonly width?: number;
  readonly selectable?: boolean;
  readonly selectedBlock?: number;
  readonly id?: string;
  readonly label?: string;
  readonly autoFocus?: boolean;
  readonly onSelectedBlockChange?: (index: number) => void | Promise<void>;
  readonly renderBlock?: (node: DocumentNode, index: number) => ReactNode;
}

Members

MemberTypeRequiredDescriptionRelated types
sourcestringYesThe source member uses the string contract.
widthnumber | undefinedNoThe width member uses the number | undefined contract.
selectableboolean | undefinedNoThe selectable member uses the boolean | undefined contract.
selectedBlocknumber | undefinedNoThe selectedBlock member uses the number | undefined contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
labelstring | undefinedNoThe label member uses the string | undefined contract.
autoFocusboolean | undefinedNoThe autoFocus member uses the boolean | undefined contract.
onSelectedBlockChange((index: number) => void | Promise<void>) | undefinedNoThe onSelectedBlockChange member uses the ((index: number) => void | Promise<void>) | undefined contract.
renderBlock((node: DocumentNode, index: number) => ReactNode) | undefinedNoThe renderBlock member uses the ((node: DocumentNode, index: number) => ReactNode) | undefined contract.DocumentNode

Source

View the secondary source reference

On this page