A collection of serializers to convert Slate JSON objects to various formats and vice versa. Designed to work in both Node.js and browser environments.
- Convert Slate to a DOM object with
slateToDom
. - Use the suite of DOM manipulation tools for
htmlparser2
before serializing to HTML. - NPM: https://www.npmjs.com/package/@slate-serializers/dom.
- Convert Slate to HTML and vice versa with
htmlToSlate
andslateToHtml
. - NPM: https://www.npmjs.com/package/@slate-serializers/html.
- Include top-level custom components with
slateToTemplate
. Framework agnostic - e.g. return Astro, React or Vue components alongside regular HTML nodes. - NPM: https://www.npmjs.com/package/@slate-serializers/template
- Convert Slate to React with
slateToReact
. - NPM: https://www.npmjs.com/package/@slate-serializers/react
- For engineering decisions, see Engineering.
- Review generated NX documentation at NX.
- This repository is an NX monorepo. Review the docs at https://nx.dev/.