react-quill
react-quill copied to clipboard
Custom link handler opens and closes tooltip immediately
I'm trying to open the tooltip to customize the link and bit closes down immediately. What could be the problem?
toolbar: {
container: ['bold', 'italic', { list: 'bullet' }, 'link'],
handlers: {
link: () => {
const editor = reactQuillRef.getEditor();
const unprivilegedEditor = reactQuillRef.makeUnprivilegedEditor(
editor,
);
const range = unprivilegedEditor.getSelection();
if (range == null || range.length == 0) {
alert('nothing is selected');
return;
}
const tooltip = editor.theme.tooltip;
tooltip.edit('link');
},
},
},
In fact, this happens with the regular link if I add any kind of custom handler. Even if it's empty
handlers: {
any: value => {
},
},
Same problem... Any news?