mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-03 05:57:47 +08:00
fix(highlightjs): syntax highlight not working in settings
This commit is contained in:
parent
f6728ca931
commit
5a186e6853
@ -1,11 +1,11 @@
|
|||||||
import type { OptionMap } from "@triliumnext/commons";
|
import { normalizeMimeTypeForCKEditor, type OptionMap } from "@triliumnext/commons";
|
||||||
import { t } from "../../../../services/i18n.js";
|
import { t } from "../../../../services/i18n.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";
|
||||||
import { ensureMimeTypesForHighlighting, loadHighlightingTheme } from "../../../../services/syntax_highlight.js";
|
import { ensureMimeTypesForHighlighting, loadHighlightingTheme } from "../../../../services/syntax_highlight.js";
|
||||||
import { Themes } from "@triliumnext/highlightjs";
|
import { Themes } from "@triliumnext/highlightjs";
|
||||||
|
|
||||||
const SAMPLE_LANGUAGE = "javascript";
|
const SAMPLE_LANGUAGE = normalizeMimeTypeForCKEditor("application/javascript;env=frontend");
|
||||||
const SAMPLE_CODE = `\
|
const SAMPLE_CODE = `\
|
||||||
const n = 10;
|
const n = 10;
|
||||||
greet(n); // Print "Hello World" for n times
|
greet(n); // Print "Hello World" for n times
|
||||||
|
Loading…
x
Reference in New Issue
Block a user