mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 15:09:01 +01:00
Create dedicated file for syntax highlight
This commit is contained in:
parent
c81b847b61
commit
bf28005f46
@ -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 link from "../../services/link.js";
|
||||||
import appContext from "../../components/app_context.js";
|
import appContext from "../../components/app_context.js";
|
||||||
import dialogService from "../../services/dialog.js";
|
import dialogService from "../../services/dialog.js";
|
||||||
|
import { initSyntaxHighlighting } from "./ckeditor/syntax_highlight.js";
|
||||||
|
|
||||||
const ENABLE_INSPECTOR = false;
|
const ENABLE_INSPECTOR = false;
|
||||||
|
|
||||||
@ -157,6 +158,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
|
|||||||
|
|
||||||
this.watchdog.setCreator(async (elementOrData, editorConfig) => {
|
this.watchdog.setCreator(async (elementOrData, editorConfig) => {
|
||||||
const editor = await BalloonEditor.create(elementOrData, editorConfig);
|
const editor = await BalloonEditor.create(elementOrData, editorConfig);
|
||||||
|
initSyntaxHighlighting();
|
||||||
|
|
||||||
editor.model.document.on('change:data', () => this.spacedUpdate.scheduleUpdate());
|
editor.model.document.on('change:data', () => this.spacedUpdate.scheduleUpdate());
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user