0

我想在我的图像的 src url 中添加一个安全令牌。我创建了一个自定义块

const BlockEmbed = Quill.import('blots/block/embed');

class CustomImage extends BlockEmbed {
    static create(d) {
        node.dataset.url = d.url;
        // How to get the quill instance here? so that I can get some config object and call a method
        const uid = this.quill.config.getUid();
        node.setAttribute('src', d.url + uid);
        ...
    }
}

有什么方法可以获取调用此 create() 方法的 quill 实例吗?

4

0 回答 0