mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix codemirror loading, closes #3282
This commit is contained in:
parent
0a02e5be83
commit
0fc9b2f203
@ -131,7 +131,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds new button the the plugin area.
|
* Adds new button to the plugin area.
|
||||||
*
|
*
|
||||||
* @param {ToolbarButtonOptions} opts
|
* @param {ToolbarButtonOptions} opts
|
||||||
*/
|
*/
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import libraryLoader from "../../services/library_loader.js";
|
import libraryLoader from "../../services/library_loader.js";
|
||||||
import TypeWidget from "./type_widget.js";
|
import TypeWidget from "./type_widget.js";
|
||||||
import keyboardActionService from "../../services/keyboard_actions.js";
|
import keyboardActionService from "../../services/keyboard_actions.js";
|
||||||
import server from "../../services/server.js";
|
|
||||||
import ws from "../../services/ws.js";
|
|
||||||
import appContext from "../../services/app_context.js";
|
|
||||||
import toastService from "../../services/toast.js";
|
|
||||||
import treeService from "../../services/tree.js";
|
|
||||||
import options from "../../services/options.js";
|
import options from "../../services/options.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
@ -49,7 +44,7 @@ export default class EditableCodeTypeWidget extends TypeWidget {
|
|||||||
delete CodeMirror.keyMap.default["Alt-Left"];
|
delete CodeMirror.keyMap.default["Alt-Left"];
|
||||||
delete CodeMirror.keyMap.default["Alt-Right"];
|
delete CodeMirror.keyMap.default["Alt-Right"];
|
||||||
|
|
||||||
CodeMirror.modeURL = 'libraries/codemirror/mode/%N/%N.js';
|
CodeMirror.modeURL = window.glob.assetPath + '/libraries/codemirror/mode/%N/%N.js';
|
||||||
|
|
||||||
this.codeEditor = CodeMirror(this.$editor[0], {
|
this.codeEditor = CodeMirror(this.$editor[0], {
|
||||||
value: "",
|
value: "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user