Document apiReference
htmlToFragment
Convert an HTML string into an SDM/1 structural fragment.
read-onlyidempotent
doc.htmlToFragment(…)Expected result
Returns an SDHtmlToFragmentResult with the converted fragment, lossy flag, and diagnostics.
Inputs
htmlstringrequiredResult
Output fields
fragmentparagraph | heading | list | table | horizontalRule | paragraph | heading | list | table | horizontalRule[]requiredparagraph / heading / list / table / horizontalRule
paragraph
idstringkind"paragraph"requiredparagraphobjectrequiredheading
idstringkind"heading"requiredheadingobjectrequiredlist
idstringkind"list"requiredlistobjectrequiredtable
idstringkind"table"requiredtableobjectrequiredhorizontalRule
idstringkind"horizontalRule"requiredhorizontalRuleobjectrequiredVariant 2
No fields.
lossybooleanrequireddiagnosticsobject[]requiredFailures
Pre-apply throws
CAPABILITY_UNAVAILABLEINVALID_INPUT
Raw schemas
Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.
View raw JSON schemas