This commit is contained in:
frostime 2023-06-28 20:43:58 +08:00
parent 837f5ae1f5
commit 22c27c0542
2 changed files with 37 additions and 3 deletions

View file

@ -9,7 +9,9 @@ import {
getFrontend,
getBackend,
IModel,
Setting
Setting,
fetchPost,
Protyle
} from "siyuan";
import "@/index.scss";
@ -167,6 +169,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);
}
@ -240,10 +251,10 @@ export default class PluginSample extends Plugin {
});
menu.addItem({
icon: "iconInfo",
label: "Dialog",
label: "Dialog(open help first)",
accelerator: this.commands[0].customHotkey,
click: () => {
this.showDialog()
this.showDialog();
}
});
if (!this.isMobile) {