CKEditor 5 Math equations and chemical formulas (ReactJs)
Math equations and chemical formulas:
https://ckeditor.com/docs/ckeditor5/latest/features/math-equations.html
Installing plugins:
https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/installing-plugins.html#adding-a-plugin-to-a-build
Import Customized Build into ReactJS:
https://github.com/ckeditor/ckeditor5/issues/2072#issuecomment-534987536
Display Math equation from CKeditor5 in ReactJS:
better-react-mathjax
https://www.npmjs.com/package/better-react-mathjax
Basic example with MathML:
import React from "react";
import { MathJax, MathJaxContext } from "better-react-mathjax";
export default function App() {
return (
<MathJaxContext>
<h2>Basic MathJax example with MathML</h2>
<MathJax>
<math>
<mrow>
<mrow>
<mfrac>
<mn>10</mn>
<mi>4x</mi>
</mfrac>
</mrow>
<mo>≈</mo>
<mrow>
<msup>
<mn>2</mn>
<mn>12</mn>
</msup>
</mrow>
</mrow>
</math>
</MathJax>
</MathJaxContext>
);
}
Comments
Post a Comment