mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
Add display toggle
This commit is contained in:
@@ -62,10 +62,11 @@ export default class MathUI extends Plugin {
|
||||
const formView = new MainFormView( editor.locale, engine );
|
||||
|
||||
formView.mathInputView.bind( 'value' ).to( mathCommand, 'value' );
|
||||
formView.displayButtonView.bind( 'displayIsOn' ).to( mathCommand, 'display');
|
||||
|
||||
// Listen to 'submit' button click
|
||||
// Listen to submit button click
|
||||
this.listenTo( formView, 'submit', () => {
|
||||
editor.execute( 'math', formView.equation );
|
||||
editor.execute( 'math', formView.equation, formView.displayButtonView.isOn );
|
||||
this._closeFormView();
|
||||
} );
|
||||
|
||||
@@ -101,6 +102,7 @@ export default class MathUI extends Plugin {
|
||||
}
|
||||
|
||||
this._form.equation = mathCommand.value || '';
|
||||
this._form.displayButtonView.isOn = mathCommand.display || false;
|
||||
}
|
||||
|
||||
_hideUI() {
|
||||
|
||||
Reference in New Issue
Block a user