1.0.11 • Published 3 months ago

@dimakorotkov/tinymce-mathjax v1.0.11

Weekly downloads
86
License
MIT
Repository
github
Last release
3 months ago

TinyMCE MathJax Plugin

This plugin using MathJax library for rendering math font.

This plugin compatible with TinyMCE 5 and MathJax 3.

Install

NPM:

npm i @dimakorotkov/tinymce-mathjax --save

You can install mathjax and tinymce from npm

npm i mathjax --save
npm i tinymce --save

Download

Usage

TinyMCE editor

Configure your TinyMCE init settings by adding external_plugins and usage of mathjax:

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
  }
});

View

For displaing mathjax on web page you have to add MathJax to the website itself. It is recommended to include /your-path-to-plugin/@dimakorotkov/tinymce-mathjax/config.js

  <script src="/your-path-to-plugin/@dimakorotkov/tinymce-mathjax/config.js" type="text/javascript" charset="utf-8"></script>
  <script src="/path-to-mathjax/es5/tex-mml-chtml.js" type="text/javascript" charset="utf-8"></script>

You can add an optional param to config.js - class

  <script src="/your-path-to-plugin/@dimakorotkov/tinymce-mathjax/config.js?class=custom-mathjax-element-class" type="text/javascript" charset="utf-8"></script>

License - MIT

1.0.11

3 months ago

1.0.9

3 months ago

1.0.10

3 months ago

1.0.8

2 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago