Right now when we display the markup for a document, all blocks are wrapped with the <draggable-block> element and all collapsible sections are wrapped with the <collapsible-block> element. Unfortunately it seems that everything inside these blocks is represented as HTML instead of Markdown.
It's not a short term concern, but in the long term, we should probably think about how to export documents in formats like Markdown, HTML, and DOCX.
When I export a Notion document as Markdown, there is no equivalent of the <draggable-block> element; I think we can just ignore those. Notion uncollapses <collapsible-block> elements and represents them as unordered lists in Markdown. I'm not sure that's the best behavior either. GitHug flavored Markdown seems to use <details><summary></summary></details> to represent collapsible sections with normal paragraph text, but collapsible headers require hacks in this scenario.
Given the lack of standardization in Markdown this problem does not seem to have a standard solution, so we can see how other apps do things when the time comes to sort it out.
Right now when we display the markup for a document, all blocks are wrapped with the
<draggable-block>element and all collapsible sections are wrapped with the<collapsible-block>element. Unfortunately it seems that everything inside these blocks is represented as HTML instead of Markdown.It's not a short term concern, but in the long term, we should probably think about how to export documents in formats like Markdown, HTML, and DOCX.
When I export a Notion document as Markdown, there is no equivalent of the
<draggable-block>element; I think we can just ignore those. Notion uncollapses<collapsible-block>elements and represents them as unordered lists in Markdown. I'm not sure that's the best behavior either. GitHug flavored Markdown seems to use<details><summary></summary></details>to represent collapsible sections with normal paragraph text, but collapsible headers require hacks in this scenario.Given the lack of standardization in Markdown this problem does not seem to have a standard solution, so we can see how other apps do things when the time comes to sort it out.