mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
aeb478a6b8
commit
b371583899
2 changed files with 12 additions and 3 deletions
|
|
@ -1232,7 +1232,7 @@ export class Toolbar {
|
|||
const eventDetail = {languages: hljsLanguages};
|
||||
if (protyle.app && protyle.app.plugins) {
|
||||
protyle.app.plugins.forEach((plugin: any) => {
|
||||
plugin.eventBus.emit("code-language-before", eventDetail);
|
||||
plugin.eventBus.emit("code-language-update", eventDetail);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1289,7 +1289,16 @@ export class Toolbar {
|
|||
} else {
|
||||
return 0;
|
||||
}
|
||||
}).forEach((item) => {
|
||||
});
|
||||
|
||||
const eventDetail = {languages: matchLanguages};
|
||||
if (protyle.app && protyle.app.plugins) {
|
||||
protyle.app.plugins.forEach((plugin: any) => {
|
||||
plugin.eventBus.emit("code-language-update", eventDetail);
|
||||
});
|
||||
}
|
||||
|
||||
matchLanguages.forEach((item) => {
|
||||
if (inputElement.value === item) {
|
||||
matchInput = true;
|
||||
}
|
||||
|
|
|
|||
2
app/src/types/index.d.ts
vendored
2
app/src/types/index.d.ts
vendored
|
|
@ -86,7 +86,7 @@ type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |
|
|||
"destroy-protyle" |
|
||||
"lock-screen" |
|
||||
"mobile-keyboard-show" | "mobile-keyboard-hide" |
|
||||
"code-language-before" | "code-language-change"
|
||||
"code-language-update" | "code-language-change"
|
||||
type TAVView = "table" | "gallery"
|
||||
type TAVCol =
|
||||
"text"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue