@convertkit/slate-htm
v0.0.4
Published
A JSX-like syntax for creating Slate Values
Downloads
522
Maintainers
Keywords
Readme
name: Slate HTM route: /slate-htm
Slate HTM
Provides JSX like syntax for creating Slate values.
Install
yarn add -D @convertkit/slate-htm
Usage
import { createHTM } from "@convertkit/slate-htm";
const html = createHTM(({
blocks: {
paragraph: "paragraph",
},
inlines: {
link: "link"
},
marks: {
bold: "bold"
}
})
const value = html`
<value>
<document>
<paragraph>Example <link>link</link></paragraph>
</document>
</value>
`