souvikinator / notion-to-md

Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
https://www.npmjs.com/package/notion-to-md
MIT License
1.08k stars 89 forks source link

support notion database #85

Closed ghost closed 1 year ago

ghost commented 1 year ago

@souvikinator 👋 I need a Notion database to markdown object format, without converting it to Markdown file. Can you help me?

souvikinator commented 1 year ago

Can you be a bit more specific? Markdown file as in markdown string?

ghost commented 1 year ago

Can you be a bit more specific? Markdown file as in markdown string?

Hi, my requirement is to use the React framework to read the Markdown object from the database, convert the database to a Markdown object, and not output it as a Markdown file. Is there a good method for this?

souvikinator commented 1 year ago

Well notion to md doesn't produce any file. toMarkdownString returns object that contains markdown string for the page id you provided. You can pass that string to the react markdown parsing package you'll be using and it should work.

ghost commented 1 year ago

Well notion to md doesn't produce any file. toMarkdownString returns object that contains markdown string for the page id you provided. You can pass that string to the react markdown parsing package you'll be using and it should work.

https://github.com/souvikinator/notion-to-md/issues/22 My question is similar to this one.