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.
#
FieldscontentWidth
#
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 }
).