-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use just Quill deltas without Quill in ShareDB? #559
Comments
Yes you can absolutely use the let content = new Delta()
textArea.addEventListener('input', () => {
const newContent = new Delta().insert(textArea.value)
const diff = content.diff(newContent)
content = newContent
doc.submitOp(diff)
}) However the difficult part is dealing with rich text formatting, which is left as an exercise for the reader. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for the rich text type indicates that it is based on quilljs deltas.
However, the example in shareDB uses the Quill editor entirely, and I haven't found any examples online that don't.
I see that Quilljs is an editor with some quirks that I don't like:
I would like to know if I can create my custom editor with content-editable and connect ShareDB to it using only quill deltas instead of requiring the full quill editor. If possible, would you recommend doing it? Or will I find myself with a headache trying to solve difficulties that Quilljs has already solved?
On the other hand, if it is not possible to use rich-text type without QuillJs, then I wonder what is the advantage of using rich-text type, since from what I see when connecting quilljs to a WebSocket the RTC already works fine without needing ShareDB. Maybe I'm not understanding well.
related reading
slab/quill#993
The text was updated successfully, but these errors were encountered: