Skip to content

JoshuaKGoldberg/notion-rich-text-to-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

Contributors

Dimitri Mitropoulos
Dimitri Mitropoulos

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

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

πŸ’™ This package was templated with create-typescript-app.

About

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

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published