mirror of https://gitee.com/godoos/godoos.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
547 B
547 B
自定义插件
::: tip 官方维护插件仓库:https://github.com/Hufe921/canvas-editor-plugin :::
开发插件
export function myPlugin(editor: Editor, options?: Option) {
// 1. 修改方法,详见:src/plugins/copy
editor.command.updateFunction = () => {}
// 2. 增加方法,详见:src/plugins/markdown
editor.command.addFunction = () => {}
// 3. 事件监听、快捷键、右键菜单、重写方法等组合处理
}
使用插件
instance.use(myPlugin, options?: Option)