Closed mohamed-sallam closed 3 years ago
I solved this problem using the installation guide in the link below:- mathjax-angular
For people who come across this, this is what I used in the config.
lazyLoad: async () => {
return new Promise((resolve, reject) => {
const script = document.createElement('script');
script.async = true;
script.onload = resolve;
script.onerror = reject;
script.crossOrigin="anonymous";
script.integrity="sha384-Wuix6BuhrWbjDBs24bXrjf4ZQ5aFeFWBuKkFekO2t8xFU0iNaLQfp2K6/1Nxveei";
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
document.head.appendChild(script);
})
}
I had this warning in my console log
math-tex-typesetting-missing: Missing the mathematical typesetting engine (mathjax) for tex.
, so it's obvious that it tells me to install MathJax, so I tried to install MathJax and KaTeX, but none of them worked.The method, that I follow to install ckeditor5-math and MathJax, was:- 1) In ckEditor5 folder, I run
npm install ckeditor5-math --save-dev
, thennpm install mathjax
. 2) Add import into ckeditor.js fileimport Mathematics from 'ckeditor5-math/src/math';
3) Add it to built-in plugins4) In ckEditor5 folder, I run
npm run-script build
.It worked fine with ckeditor5-math but display mode didn't work, in other words, MathJax didn't work and give me the above-mentioned log, so what is the right way to install MathJax or KaTaX, and how can I solve this problem?
P.S: The ckeditor5 was integrated with Angular12 App.