mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +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};
|
const eventDetail = {languages: hljsLanguages};
|
||||||
if (protyle.app && protyle.app.plugins) {
|
if (protyle.app && protyle.app.plugins) {
|
||||||
protyle.app.plugins.forEach((plugin: any) => {
|
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 {
|
} else {
|
||||||
return 0;
|
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) {
|
if (inputElement.value === item) {
|
||||||
matchInput = true;
|
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" |
|
"destroy-protyle" |
|
||||||
"lock-screen" |
|
"lock-screen" |
|
||||||
"mobile-keyboard-show" | "mobile-keyboard-hide" |
|
"mobile-keyboard-show" | "mobile-keyboard-hide" |
|
||||||
"code-language-before" | "code-language-change"
|
"code-language-update" | "code-language-change"
|
||||||
type TAVView = "table" | "gallery"
|
type TAVView = "table" | "gallery"
|
||||||
type TAVCol =
|
type TAVCol =
|
||||||
"text"
|
"text"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue