notion-rich-text-to-markdown
TypeScript icon, indicating that this package has built-in type declarations

0.1.1Β β€’Β PublicΒ β€’Β Published

Notion Rich Text to Markdown

Converts Notion's rich text strings to Markdown. πŸͺ’

πŸ‘ͺ All Contributors: 2 🀝 Code of Conduct: Kept πŸ§ͺ Coverage πŸ“ License: MIT πŸ“¦ npm version πŸ’ͺ TypeScript: Strict

Usage

npm i notion-rich-text-to-markdown
import { notionRichTextToMarkdown } from "notion-rich-text-to-markdown";

notionRichTextToMarkdown({
	annotations: {
		italic: true,
	},
	href: "https://hi.joshuakgoldberg.com",
	plain_text: "Click me!",
	type: "text",
});
// Returns:
// "_[Click me!](https://hi.joshuakgoldberg.com)_"

notionRichTextToMarkdown accepts an object like data in Notion's Rich Text API response. That shape is described by the RichTextItemResponse in @notionhq/client.

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md. Thanks! πŸͺ’

Contributors

Dimitri Mitropoulos
Dimitri Mitropoulos

πŸ’» πŸ–‹ πŸ“– πŸ€” πŸš‡ 🚧 πŸ“† πŸ”§
Josh Goldberg ✨
Josh Goldberg ✨

πŸ’» πŸ–‹ πŸ“– πŸ€” πŸš‡ 🚧 πŸ“† πŸ”§

πŸ’ This package was templated with create-typescript-app using the Bingo engine.

Readme

Keywords

none

Package Sidebar

Install

npm i notion-rich-text-to-markdown

Weekly Downloads

4

Version

0.1.1

License

MIT

Unpacked Size

9.15 kB

Total Files

5

Last publish

Collaborators

  • joshuakgoldberg