mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-28 02:26:15 -04:00
fix: use Plurimath as asset
Plurimath opal cannot be minified, esbuilded and bundled without causing unexpected exceptions So copy js in public folder and import plurimath from here
This commit is contained in:
parent
90556e8e73
commit
e5907ffdaa
12 changed files with 1915 additions and 1122 deletions
25
public/plurimath/index.js
Normal file
25
public/plurimath/index.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
import "./plurimath-opal.js";
|
||||
Opal.require("plurimath");
|
||||
window.Plurimath = class Plurimath {
|
||||
constructor(data, format) {
|
||||
this.data = Opal.Plurimath.Math.$parse(data, format);
|
||||
}
|
||||
toAsciimath() {
|
||||
return this.data.$to_asciimath();
|
||||
}
|
||||
toLatex() {
|
||||
return this.data.$to_latex();
|
||||
}
|
||||
toMathml() {
|
||||
return this.data.$to_mathml();
|
||||
}
|
||||
toHtml() {
|
||||
return this.data.$to_html();
|
||||
}
|
||||
toOmml() {
|
||||
return this.data.$to_omml();
|
||||
}
|
||||
toDisplay(lang) {
|
||||
return this.data.$to_display(lang);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue