New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-to-notion

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-to-notion

Convert an HTML string into Notion blocks

0.2.1
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 18 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts