RenderHTMLSourceProps
export
interface RenderHTMLSourceProps {Â Â contentWidth?: number;Â Â onDocumentMetadataLoaded?: (documentMetadata: DocumentMetadata) => void;Â Â onHTMLLoaded?: (html: string) => void;Â Â onTTreeChange?: (ttree: TDocument) => void;Â Â source: HTMLSource;}Defined in packages/render-html/src/shared-types.ts
Props for the ​RenderHTMLSource component.
Fields#
contentWidth#
optional
contentWidth?: number;The width of the HTML content to display. The recommended practice is to pass
useWindowDimensions().width minus any padding or margins.
Default: Dimensions.get('window').width
onDocumentMetadataLoaded#
optional
Handler invoked when the document metadata is available. It will re-trigger on HTML content changes.
onHTMLLoaded#
optional
onHTMLLoaded?: (html: string) => void;Triggered when HTML is available to the RenderHTML component.
onTTreeChange#
optional
Triggered when the transient render tree changes. Useful for debugging.
source#
required
The object source to render (either { uri }, { html } or { dom }).