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>
shadcome
  • 49
  • 7
  • any one if know how to use wiris math in angular ,thanks for helping me. – shadcome Jan 20 '21 at 05:28
  • I´m afraid you have to import the library in the head of your html, like ´´. See here: https://www.npmjs.com/package/@wiris/mathtype-generic – mayid Aug 02 '21 at 23:11

0 Answers0