0

I Want to add Wiris plugin to a simple page , but a error occurred . any one can help me?

enter image description here

TS Code

import { Component } from '@angular/core';
import { WirisPlugin } from '@wiris/mathtype-generic';

@Component({
  selector: 'sc-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {

  constructor() {
    const genericIntegrationProperties: any = {};
    genericIntegrationProperties.target = document.getElementById('htmlEditor');
    genericIntegrationProperties.toolbar = document.getElementById('toolbar');

    // GenericIntegration instance.
    const gp = new WirisPlugin();
    const genericIntegrationInstance = gp.GenericIntegration(genericIntegrationProperties);
    genericIntegrationInstance.init();
    genericIntegrationInstance.listeners.fire('onTargetReady', {});
  }
}

HTML Code

<div id="toolbar"></div>
<div id="htmlEditor" contenteditable="true">Try me!</div>
4

0 回答 0