我不知道如何在创建的自定义污点上添加工具提示。类似于链接上本地发生的事情
[我的自定义污点在带有cusom标签的文本编辑器中显示
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);
所以插入到我的编辑器中的代码在这些标记之间
<my-custom-tag>some html</my-custom-tag>
我知道已经有一段时间了,但是对于任何对此主题感兴趣的人,请参见以下链接: