Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(config): Fix loading with no config object
Tony Narlockc95ecf504d7c
diff --git a/src/mathediting.js b/src/mathediting.jsindex 5a4a1973ac..31d14f49a9 100644--- a/src/mathediting.js+++ b/src/mathediting.js@@ -12,6 +12,20 @@ export default class MathEditing extends Plugin {return 'MathEditing';}+ constructor( editor ) {+ super( editor );+ editor.config.define( 'math', {+ engine: 'mathjax',+ outputType: 'script',+ className: 'math-tex',+ forceOutputType: false,+ enablePreview: true,+ previewClassName: [],+ popupClassName: [],+ katexRenderOptions: {}+ } );+ }+init() {const editor = this.editor;editor.commands.add( 'math', new MathCommand( editor ) );@@ -23,16 +37,6 @@ export default class MathEditing extends Plugin {'viewToModelPosition',viewToModelPositionOutsideModelElement( editor.model, viewElement => viewElement.hasClass( 'math' ) ));- editor.config.define( 'math', {- engine: 'mathjax',- outputType: 'script',- className: 'math-tex',- forceOutputType: false,- enablePreview: true,- previewClassName: [],- popupClassName: [],- katexRenderOptions: {}- } );}_defineSchema() {