Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在羽毛笔中有两个工具栏。
我需要将图像工具放在自定义工具栏中,但问题是 quill 只允许 addHandler 用于它自己的工具栏,因此当用户单击我的图像时,我需要以编程方式打开 quill 图像上传器。
有什么办法吗?
谢谢
您可以访问quill.getModule('toolbar')将公开格式处理程序的 Quill 工具栏。这也适用于您添加到 Quill 工具栏的自定义处理程序。
quill.getModule('toolbar')
// ... set up quill stuff // get the quill toolbar let toolbar = quill.getModule('toolbar') // call the image handler toolbar.handlers.image()