Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Quill 羽毛笔在自定义斑点上添加工具提示_Quill - Fatal编程技术网

Quill 羽毛笔在自定义斑点上添加工具提示

Quill 羽毛笔在自定义斑点上添加工具提示,quill,Quill,我不知道如何在创建的自定义污点上添加工具提示。类似于链接上本地发生的事情 我的自定义污点显示在带有cusom标记的文本编辑器中 class CustomBlot extends BlockEmbed { static create(value) { let node = super.create(); node.setAttribute('object', "instrument"); node

我不知道如何在创建的自定义污点上添加工具提示。类似于链接上本地发生的事情

我的自定义污点显示在带有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);
class CustomBlot扩展了BlockEmbed{
静态创建(值){
让node=super.create();
node.setAttribute('object','instrument');
node.setAttribute('id',value.id);
node.innerHTML=`
${value.name}
`;
返回节点;
}
静态格式(节点){
返回node.getAttribute('id');
}
}
CustomBlot.blottname='custom';
CustomBlot.tagName='我的自定义标记';
羽毛套准器(定制印记);
因此,在我的编辑器中插入的代码位于这些标记之间

<my-custom-tag>some html</my-custom-tag>
一些html

我知道这已经有一段时间了,但对于任何对该主题感兴趣的人,请参见以下链接: