Skip to content

Commit

Permalink
Update plugin.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob authored Jun 5, 2024
1 parent 5c7d0d7 commit e6b000c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/core/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ class FontPlugin {
public editor: IEditor;
// 插件名称
static pluginName = 'FontPlugin';
// 暴漏的API名称
// 挂载API名称
static apis = ['downFontByJSON'];
// 发布事件
static events = ['textEvent1', 'textEvent2'];
// 快捷键 keyCode hotkeys-js
public hotkeys: string[] = ['backspace', 'space'];
// 私有属性
Expand All @@ -29,8 +31,11 @@ class FontPlugin {
// 挂载API方法
downFontByJSON(str: string) {}

// 私有方法
_createFontCSS(){}
// 私有方法 + 发布事件
_createFontCSS(){
const params = []
this.editor.emit('textEvent1', params)
}

// 右键菜单
contextMenu() {
Expand Down

0 comments on commit e6b000c

Please sign in to comment.