slateToDom
From @slate-serializers/dom. Converts Slate JSON to a htmlparser2 DOM (nodes use the same model as domhandler). slateToHtml uses this pipeline and then serializes to an HTML string—you only need slateToDom when you want to walk or mutate the DOM before serialization.
Config uses the same shape as slateToHtml. Default: packages/dom/src/lib/config/default.ts.
Usage
Additional exports
Helpers such as extractCssFromStyle, styleMapToAttribs, and isEmptyObject are available for attribute and style work. You can also import the ChildNode type and the Element / Text constructors from @slate-serializers/dom or @slate-serializers/html (no separate domhandler dependency required).
@slate-serializers/utilities
A separate package with small shared helpers (nested property access, style object handling, etc.). Most apps only need @slate-serializers/html or @slate-serializers/dom; import utilities when you extend serializers.
Further reading
- slateToHtml configuration —
markMap,elementTransforms, and encoding options use the same DOM config shape.