Skip to content

plusye/html-to-notion

This branch is up to date with baptisteArno/html-to-notion:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jul 18, 2021
77971ba · Jul 18, 2021

History

13 Commits
Jun 5, 2021
Jul 18, 2021
Jul 18, 2021
Jul 18, 2021
Jul 18, 2021
Jul 18, 2021
Jun 5, 2021
Jun 3, 2021
Jul 18, 2021
Jul 18, 2021
Jul 18, 2021
Jul 18, 2021
Jul 18, 2021
Jul 18, 2021

Repository files navigation

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

About

Convert raw HTML into Notion blocks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.9%
  • JavaScript 0.1%