I’m working on this aspect of my project right now and I am a little confused by your question. ProseMirror has a function to serialize it’s document model (register.serializeTo) into JSON format (or text or markdown) and parse it back to PM document
The following is a simple one block example, but feel free to try out more complex examples to see how it deals with inline styles, bulleted lists, etc.
{"content":
[
{"content":
[
{
"text":"This area is dedicated to my personal book notes that
Im electing to publicly share via Project AMPLE.",
"type":"text"
}
],
"type":"paragraph"}
],
"type":"doc"
}
If you aren’t using javascript on the server, you could plug in in a package such as pyexecjs to run the appropriate prosemirror converters server side and generate html there to render in templates. (As to avoid having to send the appropriate prosemirror components to the client)
Or if the client will have the package, you can just use register.parseFrom there.
From there, (for example) you can use this to pull out a truncated string (the first text block) or all hyperlinks … or headers. Or you can just store both the HTML and json formats if you don’t care about duplication.
I checked out mobile-doc and I’m not entirely sure what benefit it brings over this method. What about it has piqued your interests? I was just using the demo and it seems it hasn’t implemented bulleted/indented lists (whereas in prosemirror, they are.)
Finally, if you are worried about this JSON schema changing over time, that’s something that we’d need Marijn to chime in on. If it does change, it’d make complete sense to assume fallback converters to keep it up to date, as there’d be too many issues any other way.
(Please clarify, and let me know If i misinterpreted your question!)
P.S: If this does answer your question and you use python on the backend, I will gladly help you out with executing javascript modules from python.