1.0.2 • Published 2 years ago

notion-rich_text-to-md v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

This package provides you with a function that can parse an array of rich_text objects in database property.

    function parseRichText(rich_text, options)

For example, if you have notionPage and you want to parse its Text property, kindly use

const result = parseRichText(notion.page.properties["Text"].rich_text)

alternatively you can use

const result = parseRichText(notion.page.properties["Text"])

result should be the same.

Also you can specify options, if you want to parse just bold or just links. In this case you should use {bold: true}. If you want parse your text to plain, use {plain = true}.