I'm trying to customize the Quill editor for my needs. I managed to implement and insert custom blots, as described in https://quilljs.com/guides/cloning-medium-with-parchment/ But I need to edit data, which is attached to my blots, like the URL of a link for example. The default implementation of Quill displays a small "inline" edit box for links. I want to implement something like that myself, but just don't get it. I did not find any hints in the docs and guides. Reading the source code of Quill, I was not able to figure out where the editing dialog for links is implemented. Any starting point would be very appreciated.
相关问题
- How to make quill editor required?
- Quill Editor: Restricted Editing based on tags/cla
- Include Headings in Quill Rich Editor
- Quill table with Angular, not working on edit mode
- How to paste plain text in a Quill-based editor
相关文章
- Implement custom editor for Quill blot
- Get HTML from Delta on Quill
- Quill - Make Editor wrap text in Div instead of P
- Why does Quill filter it's content?
- Dynamically change Quill placeholder
- How to add a non editable tag to content in Quill
- ES6/Babel Class constructor cannot be invoked with
- How do I post contents of a Quill editor in a form
Here's a partial answer. Please see lines 41-64 in file "https://github.com/quilljs/quill/blob/develop/themes/snow.js"
I haven't tried implementing something similar but it looks like Quill is watching a "selection-change" event and checks if the selection is on a LinkBlot with a defined link.
The SnowTooltip class includes references to the selectors, 'a.ql-preview', 'ql-editing', 'a.ql-action', and 'a.ql-remove', which we find in the link-editing tooltip.
I've tried something similar. Proper way of doing it should be creating a module. Unfortunately as you already know it is not as easy as it seems.
Let me point you to some useful resources that helped me a lot with understanding how to create extensions for quill. Quills maintainer is curating Awesome quill list.
I recommend looking especially into
Here is my try on to it using custom quill module.
CodePen Demo
To see the tooltip:
Main issues that need to be addressed: