I can't figure out how to add a tooltip on a created custom blot. Something like what is natively happening on links
My custom blot is displayed in the text editor with cusom tag
class CustomBlot extends BlockEmbed {
static create(value) {
let node = super.create();
node.setAttribute('object', "instrument");
node.setAttribute('id', value.id);
node.innerHTML = `
<div class="btn-group">
<button class="btn btn-sm btn-outline-info">${value.name}</button>
</div>
`;
return node;
}
static formats(node) {
return node.getAttribute('id');
}
}
CustomBlot.blotName = 'custom';
CustomBlot.tagName = 'my-custom-tag';
Quill.register(CustomBlot);
So the inserted code in my editor is between these tags
<my-custom-tag>some html</my-custom-tag>
I know it's been a while, but for anyone interested in the subject, please, see the following link:
https://github.com/loagit/Quill-Examples-and-FAQ
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With