-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
There are two 'new quill' in my project, quill1 need insert the CustomHtmlBlot, quill2 needn't
when Quill.register(CustomHtmlBlot)
Steps for Reproduction
`
class CustomHtmlBlot extends Quill.import("blots/block/embed") {
static create(value: string) {
let node = super.create(value);
node.innerHTML = DOMPurify.sanitize(value, {
FORBID_TAGS: ["style"],
});
return node;
}
static value(node: HTMLElement) {
return node.innerHTML;
}
}
CustomHtmlBlot.tagName = "DIV";
CustomHtmlBlot.blotName = "custom-html-blot";
Quill.register(CustomHtmlBlot);
const quill1 = new Quill(el, {
theme: "snow",
formats: ['custom-html-blot'],
})
const quill2 = new Quill(el, {
theme: "snow",
formats: [],
})
`
Expected behavior:
The quill2 can paste the text which copy from vscode or notes
Actual behavior:
The quill2 instance couldn't paste the text which copy from vscode or notes
The quill1 can edit the blot content
Platforms:
chrome
Version:
1.3.7