3 ms·
As a long-time user of Quill, I must say: Congratulations to jhchen and everyone else who worked on the project. I use Quilljs because it's a great implementat
by pfooti 10y ago
As a long-time user of Quill, I must say: Congratulations to jhchen and everyone else who worked on the project.
I use Quilljs because it's a great implementation of a modern-thinking WYSIWYG text editor. The underlying parchment[0] library helps a lot to separate out the data model from the rendered view (instead of relying on contenteditable to handle your data model, like many other classic rich text editors do). My users type stuff in Quill, and my front end shoots data in the rich-text[1] format back to the back-end. I have a small (and not great, but functional for my needs) library [2] I wrote to convert rich-text back into HTML, so we never actually store user-entered HTML entities in our database (which helps a lot for things like protecting against XSS attacks, and since rich-text is just a JSON object, I can do interesting database queries that are a bit trickier to pull off if it had been HTML).
On top of all of that, Quill emits delta objects on user interaction (that conform to an operational transform model), so it's pretty straightforward to wire it into a concurrent editing system. This isn't batteries-included (you have to deal with resolving the operational transforms yourself, which is of course tricky) but it's a great start in that direction.
0: https://github.com/quilljs/parchment https://github.com/quilljs/parchment
1: https://github.com/ottypes/rich-text https://github.com/ottypes/rich-text
2: https://github.com/ericeslinger/delta-transform-html https://github.com/ericeslinger/delta-transform-html
- sampl 10y agoI'd love to see some work on doing OT with Quill deltas. A simple Quill + Meteor/Firebase bridge could be a pretty great, easy to spin-up, real-time collaborative document editing tool.
- nateps 10y agoQuill's OT type is compatible with ShareDB, which provides a simple to use backend that takes care of all this coordination. Here is a simple example of using the two together: https://github.com/share/sharedb/tree/master/examples/rich-text https://github.com/share/sharedb/tree/master/examples/rich-t...
- gp7 10y agoBefore the document format was added to sharedb I found it real easy to transform quill deltas into sharejs ops. Sharejs has a fuzzer you can use to test things like that, which was invaluable, but I want to stress how little work it was getting them to talk to each other. It'll be even less now