0.0.4 • Published 4 years ago

@convertkit/slate-htm v0.0.4

Weekly downloads
115
License
MIT
Repository
-
Last release
4 years ago

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>
`