tinymce 安裝的方法在前文中有說明:
https://www.cnblogs.com/already/p/12012752.html
項目中已經安裝tinymce
1、先下載 tinymce-mathjax包
https://github.com/dimakorotkov/tinymce-mathjax/archive/master.zip
2、復制tinymce-mathjax包中的min.js 和config 到你的項目中,兩個文件要同級
3、下載tex-mml-chtml.js 文件到你的項目中
https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
4、下載tex-mml-chtml需要的字體
5、配置tinymce
tinymce.init({ ... external_plugins: {'mathjax': '/your-path-to-plugin/@dimakorotkov/tinymce-mathjax/plugin.min.js'}, toolbar: 'mathjax', mathjax: { lib: '/path-to-mathjax/es5/tex-mml-chtml.js', //required path to mathjax //symbols: {start: '\\(', end: '\\)'}, //optional: mathjax symbols //className: "math-tex", //optional: mathjax element class //configUrl: '/your-path-to-plugin/@dimakorotkov/tinymce-mathjax/config.js' //optional: mathjax config js } });
項目中就有啦
自己錄入吧,公式網上搜吧
mathjax 官網:
mathjax github: