如何使用自定义元素扩展 ckeditor5 中的图像插件?

How to extend the Image plugin in ckeditor5 with custom elements?

我们正在评估从 ckeditor 4 升级到新的 ckeditor 5,但我需要能够使用一些自定义元素扩展图像 plugin/package,例如用于图像许可信息的文本输入,用于将图像切换为缩略图或非缩略图的 button/checkbox 等

如何在图像包中添加这些自定义元素并编写自己的 javascript 代码来处理这些元素的值?

图像工具栏由 config.image.toolbar property. It accepts names of UI components registered in the editor.ui.components factory. In other words, it works like the main editor toolbar which is configurable via editor.toolbar and you can learn more how to create buttons here: Creating a simple plugin 控制。