Server side ProseMirorr document editing

I posted this question in an old thread that was related, but I’ve concluded that it’s better to start a new thread.

I need to do server side manipulation of ProseMirror documents stored as JSON. I think it would be cleanest to use the ProseMirror model, schema, etc. to do that. It seems that it should be possible by running a Javascript interpreter embedded in my Python server. I tried PyMiniRacer (V8), which died of a stack overflow seg fault during creation of a small schema, and js2py which died while translating the ProseMirror code bundle.

I’d like to inquire about whether anyone has had success in using the ProseMirror Javascript code in a server-side interpreter. Any pointers would be appreciated.

I don’t have much experience with running JS from Python, but my intuition would be that running node.js as a subprocess would be the easiest approach (because it doesn’t involve any experimental/tricky code)


This is what we’ve had to do in past (shell out to node.js) (tried with MiniRacer and other runtimes in Ruby with limited success), but that’s admittedly pretty slow. What we do now is run a separate node process with a simple expressjs service for importing html server-side. For manipulation we have a simple ruby library that lets us manipulate the json.

1 Like