thanks for the offer! It’s always a good idea to work together and look at each others work. I am also helping on improving the various contenteditable specs . Unfortunately, it is currently not recommended to make changes directly to the contenteditable, but instead to use a model in-between. So basically modern editors work like this:
- user makes input
- document model is updated
- DOM is updated to be in line with document model
To assist in this, we made the
Why is it not recommended to directly do everything in contenteditable the way the older versions of TinyMCE or CKEditor did? Because contenteditable is both buggy and implemented slightly differently in every browser, so what these editors did was “tweak” how the input was treated, at times modifying the DOM after the fact at times canceling the event that lead to the change. This was all fairly similar to today’s way of doing it, but without the added benefit of having a model of the document to base it on.
Plugins that just operate on the DOM themselves without “knowledge” of the editor in question make the picture even more complex. For example, there used to be a Grammarly-plugin that people installed directly into Chrome. And it crashed both TinyMCE and CKEditor and probably most other editors, apparently without the Grammarly developers ever finding out.
So in short: Fidus Writer is using contenteditable, true, but unfortunately it will be incompatible with any plugin that will try to directly modify the DOM. It does use the ProseMirror for the model and DOM in/output, so part of the code could be reused by other editors using the ProseMirror-library. In case there are other editors willing to help, we could split out one part that directly interacts with ProseMirror and license that part LGPL.