0.2.1 • Published 3 years ago

html-to-notion v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

HTML to Notion blocks

This library allows you to convert an HTML string into Notion blocks that you can directly use for the Notion API

Getting started

yarn add html-to-notion
import parseHtmlToNotionBlocks from '../src/lib/parser';

const rawHtml = `<p>Hi!</p>`;

const notionBlocks = parseHtmlToNotionBlocks(rawHtml);

// [
//  {
//    object: "block",
//    paragraph: {
//      text: [{ text: { content: "Hi" }, type: "text" }],
//    },
//    type: "paragraph",
//  },
//];

To-Do

  • Support lists
  • Support decorated texts