mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
Create dedicated file for syntax highlight
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export function initSyntaxHighlighting() {
|
||||
console.log("Init syntax highlight");
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import AbstractTextTypeWidget from "./abstract_text_type_widget.js";
|
||||
import link from "../../services/link.js";
|
||||
import appContext from "../../components/app_context.js";
|
||||
import dialogService from "../../services/dialog.js";
|
||||
import { initSyntaxHighlighting } from "./ckeditor/syntax_highlight.js";
|
||||
|
||||
const ENABLE_INSPECTOR = false;
|
||||
|
||||
@@ -157,6 +158,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
|
||||
|
||||
this.watchdog.setCreator(async (elementOrData, editorConfig) => {
|
||||
const editor = await BalloonEditor.create(elementOrData, editorConfig);
|
||||
initSyntaxHighlighting();
|
||||
|
||||
editor.model.document.on('change:data', () => this.spacedUpdate.scheduleUpdate());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user