Add engine option

This commit is contained in:
Sauli Anto
2019-09-17 16:19:35 +03:00
parent a89cadeac5
commit dbaaa96ae9
6 changed files with 23 additions and 15 deletions

View File

@@ -57,7 +57,10 @@ export default class MathUI extends Plugin {
_createFormView() {
const editor = this.editor;
const mathCommand = editor.commands.get( 'math' );
const engine = 'mathjax';
const mathConfig = editor.config.get( 'math' );
// Todo: better checks
const engine = typeof mathConfig !== 'undefined' && typeof mathConfig.engine !== 'undefined' ? mathConfig.engine : 'mathjax';
const formView = new MainFormView( editor.locale, engine );