feat(share): enable syntax highlighting

This commit is contained in:
Elian Doran
2025-06-09 18:22:30 +03:00
parent 54ffeeaed9
commit 1bcb811835
8 changed files with 82 additions and 47 deletions

View File

@@ -6,7 +6,7 @@ import options from "../../../services/options.js";
import { ensureMimeTypesForHighlighting, isSyntaxHighlightEnabled } from "../../../services/syntax_highlight.js";
import utils from "../../../services/utils.js";
import emojiDefinitionsUrl from "@triliumnext/ckeditor5/emoji_definitions/en.json?url";
import { copyText } from "../../../services/clipboard.js";
import { copyTextWithToast } from "../../../services/clipboard_ext.js";
const TEXT_FORMATTING_GROUP = {
label: "Text formatting",
@@ -116,7 +116,7 @@ export function buildConfig(): EditorConfig {
enabled: isSyntaxHighlightEnabled()
},
clipboard: {
copy: copyText
copy: copyTextWithToast
},
// This value must be kept in sync with the language defined in webpack.config.js.
language: "en"