
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
html-to-notion-blocks
Advanced tools
Transform HTML to Notion blocks
A small library that transforms HTML to Notion blocks. It is based on rehype-to-notion.
You want a simple way to convert HTML to Notion blocks. If you want to control the conversion process, you should use rehype-to-notion instead.
This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, or 18.0+).
pnpm add html-to-notion-blocks
# or
# yarn add html-to-notion-blocks
# or
# npm install html-to-notion-blocks
import { htmlToNotion } from 'html-to-notion-blocks'
const html = '<p>Hello world!</p>'
const notionBlocks = htmlToNotion(html)
console.log(notionBlocks)
// [
// {
// object: 'block',
// type: 'paragraph',
// paragraph: {
// text: [
// {
// type: 'text',
// text: {
// content: 'Hello world!',
// link: null
// },
// annotations: {
// bold: false,
// italic: false,
// strikethrough: false,
// underline: false,
// code: false,
// color: 'default'
// },
// plain_text: 'Hello world!',
// href: null
// }
// ]
// }
// }
// ]
htmlToNotion(html: string, options?: Options): NotionBlock[]
Transform HTML to Notion blocks.
html
Type: string
The HTML to transform.
options
Type: Options
Options for the transformation.
See rehype-to-notion for the full list of options.
Use of html-to-notion-blocks
can open you up to a [cross-site scripting (XSS)][xss] attack. If you are processing user input, be sure to use a HTML sanitizer, such as [rehype-sanitize][rehype-sanitize].
GPL-3.0-or-later © Thomas F. K. Jorna
FAQs
Transform HTML to Notion blocks
The npm package html-to-notion-blocks receives a total of 3 weekly downloads. As such, html-to-notion-blocks popularity was classified as not popular.
We found that html-to-notion-blocks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.