mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +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 {
|
||||
requireCss,
|
||||
requireLibrary,
|
||||
loadHighlightingTheme,
|
||||
CKEDITOR,
|
||||
CODE_MIRROR,
|
||||
ESLINT,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import library_loader from "../../../../services/library_loader.js";
|
||||
import server from "../../../../services/server.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.on("change", async () => {
|
||||
const newTheme = this.$themeSelect.val();
|
||||
library_loader.loadHighlightingTheme(newTheme);
|
||||
await server.put(`options/highlightingTheme/${newTheme}`);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user