Tranforming ProseMirror JSON to plain markdown

Hi,

is there a relatively simple way to transform a ProseMirror JSON document into plain markdown for data migration purposes? Either with JavaScript/node.js or with Python but not as part of a web app but in a standalone fashion (read the JSON from a DB, transform into and output markdown text)

I’ve been looking at GitHub - fellowapp/prosemirror-py: Python implementation of core ProseMirror modules - but the associated docs are really geared towards using this for building editors and I couldn’t find anything there yet for “export functions” …

Thanks in advance for any pointers!

The prosemirror-markdown package comes with functionality for emitting and parsing markdown, but to use it with a custom schema you might need some extra code that maps your node types to markdown features.

I also encountered a similar situation recently. A simple python tool library is released here:prosemirror-py-converter · PyPI