We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After creating a custom blot, when I copy and paste a link, both the href and innerHTML of the link become undefined. How can I resolve this?
this is my code
const Inline = Quill.import('blots/inline') // @ts-ignore class Emoji extends Inline { static blotName = 'div'; // blot的名称,需要唯一,防止冲突 static tagName = 'a'; // 渲染的标签名 static create(value: any) { console.log(value) const dom = super.create(value) dom.setAttribute('href', value.href); // dom.setAttribute('id', 'downLoadFile'); dom.setAttribute('rel', 'noopener noreferrer'); dom.setAttribute('target', '_blank'); dom.innerText = value.text return dom } } Quill.register({ 'formats/emoji': Emoji }, true) ```typescript add code ` const cursorPosition = quill.current.getSelection()?.index || 0; quill.current.insertEmbed(cursorPosition, 'div', { href: obj.href, text: obj.text }); ```typescript
`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
After creating a custom blot, when I copy and paste a link, both the href and innerHTML of the link become undefined. How can I resolve this?
this is my code
`
The text was updated successfully, but these errors were encountered: