mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-30 03:32:26 +08:00
client: Apply syntax highlight in real-time
This commit is contained in:
parent
0d270cbeb6
commit
2fdff29067
@ -177,6 +177,7 @@ function loadHighlightingTheme(theme) {
|
|||||||
export default {
|
export default {
|
||||||
requireCss,
|
requireCss,
|
||||||
requireLibrary,
|
requireLibrary,
|
||||||
|
loadHighlightingTheme,
|
||||||
CKEDITOR,
|
CKEDITOR,
|
||||||
CODE_MIRROR,
|
CODE_MIRROR,
|
||||||
ESLINT,
|
ESLINT,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import library_loader from "../../../../services/library_loader.js";
|
||||||
import server from "../../../../services/server.js";
|
import server from "../../../../services/server.js";
|
||||||
import OptionsWidget from "../options_widget.js";
|
import OptionsWidget from "../options_widget.js";
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ export default class HighlightingOptions extends OptionsWidget {
|
|||||||
this.$themeSelect = this.$widget.find(".theme-select");
|
this.$themeSelect = this.$widget.find(".theme-select");
|
||||||
this.$themeSelect.on("change", async () => {
|
this.$themeSelect.on("change", async () => {
|
||||||
const newTheme = this.$themeSelect.val();
|
const newTheme = this.$themeSelect.val();
|
||||||
|
library_loader.loadHighlightingTheme(newTheme);
|
||||||
await server.put(`options/highlightingTheme/${newTheme}`);
|
await server.put(`options/highlightingTheme/${newTheme}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user