-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Ability to mark text #1205
Comments
Look at the authorship module. |
@benbro took a look at this Authorship module you wrote and had a question: In my testing, binding directly to the TEXT_CHANGE event rather than the EDITOR_CHANGE event, it is fired after the content is already inserted into document tree. Are the modifications that you make to the delta in the Authorship module respected in any other functions bound to the TEXT_CHANGE event because EDITOR_CHANGE is called before TEXT_CHANGE (within Quill core)? If not, i'm having a hard time trying to wrap my head around how the Authorship module modifies the operations of the outgoing delta. |
From the docs, the difference between the editor-change event and the text-change event:
This can be verified in the code. The PR is an update of the module from Quill 0.2. |
Awesome, this is super helpful. Appreciate the quick replies! |
Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏 |
Wondering if there has been any discussion around the concept of "marking text" similar to the way CodeMirror does it?
In my scenario, marking text is useful for tying an external comment to a specific piece of text in a collaborative editing environment. Example below:
In the above example, saving a range wouldn't work as you would have to continually transform the saved range across the deltas coming through whatever OT adapter you have. Additionally, saving a range wouldn't allow you to style the marked text in any way (e.g. by highlighting the text that is being commented about in yellow).
The only thought I had that might work was to somehow call formatText on your current selection using Quill.sources.SILENT as the source, however, it would be extremely difficult to make sure that the silent format application doesn't somehow make it back to the OT adapter and get sent to the other users. If anyone has any thoughts on how to accomplish this without creating new code in Quill, let me know!
The text was updated successfully, but these errors were encountered: