Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jun 23, 2023
1 parent dd097a7 commit 139a341
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"byePlugin": "Bye, Plugin!",
"showDialog": "Show dialog",
"removedData": "Data deleted",
"confirmRemove": "Confirm to delete the data in ${name}?"
"confirmRemove": "Confirm to delete the data in ${name}?",
"insertEmoji": "Insert Emoji"
}
3 changes: 2 additions & 1 deletion src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"byePlugin": "再见,插件!",
"showDialog": "弹出一个对话框",
"removedData": "数据已删除",
"confirmRemove": "确认删除 ${name} 中的数据?"
"confirmRemove": "确认删除 ${name} 中的数据?",
"insertEmoji": "插入表情"
}
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,15 @@ export default class PluginSample extends Plugin {
actionElement: btnaElement,
});

this.protyleSlash = [{
filter: ["insert emoji 😊", "插入表情 😊", "crbqwx"],
html: `<div class="b3-list-item__first"><span class="b3-list-item__text">${this.i18n.insertEmoji}</span><span class="b3-list-item__meta">😊</span></div>`,
id: "insertEmoji",
callback(protyle: Protyle) {
protyle.insert("😊");
}
}];

console.log(this.i18n.helloPlugin);
}

Expand Down

0 comments on commit 139a341

Please sign in to comment.