I love CodeMirror and like very much the content of the Marijn's blog posts I've read, but I must say ProseMirror is a nightmare to work with. I guess the problem is that there is too much customization options, no sane defaults, no understandable tutorials, many different overlapping API and documentation versions.
I've tried a lot to get it working for https://github.com/fiatjaf/coisas and only managed to make it work by copying running code from one of the demos, ignoring all customization and working myself around the editor to provide the custom functions I needed.
I may be totally wrong here, but I'm trying to be sincere about my experience.
Thanks for sharing your experience. It sounds like the author is aware that ProseMirror is hard to work with, and to some degree this is "by design". From the announcement:
> If you're looking for a simple drop-in rich text editor component, ProseMirror is probably not what you need. (We do hope that such components will be built on top of it.) The library is optimized for demanding, highly-integrated use cases, at the cost of simplicity.
I used ProseMirror back in the day (well over a year ago now) on a site I was working on and it ended up being a nightmare to maintain. It would break on every new version, screw up the build process, error constantly in mysterious ways that forced you to dive into the internals... At the time it was not designed with the state-view architecture either, making it harder to reason about.
I ended up scrapping it entirely for Quill and it was a massive relief.
In my opinion as a mostly-uneducated observer to this project, it is exactly the kind of project that would benefit massively from static type-checking. I can't count the number of times things broke on an upgrade because of simple bugs in the code where `undefined` would trickle through function calls or function interfaces were updated and other parts of the codebase were not updated in accordance. These are not hard problems to solve, but if you're dogmatic about using vanilla JS with as little build step as possible, you're going to run into these all the time.
Sorry that I was not clear in my original comment, I meant to say that I speculate the ProseMirror codebase itself would have taken massive benefit from type-checking over its lifetime, to reduce the number of bugs the end user would have to track down.
Have you looked at Quill https://quilljs.com/? I was looking at text editors yesterday for a new project, where I want to represent images as either custom tags or placeholders that get transformed (in the system the image is known by its storage ID, not a URL) and Quill looked easier to work with than ProseMirror.
I haven't tried ProseMirror, but I've can second the endorsement for Quill. For the past three months, I've been working on a large-scale integration of Quill (with lots of customizations) into a commercial word-processor (https://shaxpir.com) and it has been a lovely experience.
A lot of the underlying ideas are similar between Quill and ProseMirror, so I'm curious to hear a knowledgable comparison of the two. But the excellent Quill documentation, as well as the responsiveness of the primary developer to github issues and stackoverflow questions, made it an easy choice for me.
I have looked at it and don't remember why I didn't end up using it. Perhaps due to my ignorance, I have probably thought it wasn't capable of outputting Markdown seamlessly, and that was really necessary for https://github.com/fiatjaf/coisas/.
I've tried a lot to get it working for https://github.com/fiatjaf/coisas and only managed to make it work by copying running code from one of the demos, ignoring all customization and working myself around the editor to provide the custom functions I needed.
I may be totally wrong here, but I'm trying to be sincere about my experience.