notion-rich-text-to-markdown
v0.1.0
Published
Converts Notion's rich text strings to Markdown. 🪢
Downloads
3
Readme
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
💙 This package was templated with
create-typescript-app
.