Add hash to math preview

This commit is contained in:
Sauli Anto
2019-10-06 11:13:17 +03:00
parent 60a145333a
commit 98815fcef0
4 changed files with 50 additions and 48 deletions

View File

@@ -3,10 +3,11 @@ import View from '@ckeditor/ckeditor5-ui/src/view';
import { renderEquation } from '../utils';
export default class MathView extends View {
constructor( engine, locale ) {
constructor( engine, locale, previewUid ) {
super( locale );
this.engine = engine;
this.previewUid = previewUid;
this.set( 'value', '' );
this.set( 'display', false );
@@ -29,7 +30,7 @@ export default class MathView extends View {
}
updateMath() {
renderEquation( this.value, this.element, this.engine, this.display, true );
renderEquation( this.value, this.element, this.engine, this.display, true, this.previewUid );
}
render() {