tinymce增加mathjax 支持数学公式录入渲染

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 官网:

https://www.mathjax.org/ 

mathjax github:

https://github.com/mathjax/MathJax-src

posted on   studyphp  阅读(3878)  评论(1编辑  收藏  举报

编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
历史上的今天:
2017-05-12 unable to bind listening socket for address '127.0.0.1:9090': Address already in use (98)

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示