# @dimakorotkov/tinymce-mathjax

> Plugin using MathJax library for rendering math font

Latest version **1.0.11** (published 2024-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dimakorotkov/tinymce-mathjax
pnpm add @dimakorotkov/tinymce-mathjax
yarn add @dimakorotkov/tinymce-mathjax
bun add @dimakorotkov/tinymce-mathjax
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2024-02-21 |
| First published | 2019-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 47 |
| Author | Dmitriy Korotkov |
| Maintainers | dimakorotkov |
| Keywords | tinymce, mathjax |

## Links

- npm: https://www.npmjs.com/package/@dimakorotkov/tinymce-mathjax
- Repository: https://github.com/dimakorotkov/tinymce-mathjax
- Homepage: https://github.com/dimakorotkov/tinymce-mathjax#readme
- Issues: https://github.com/dimakorotkov/tinymce-mathjax/issues
- npm.io page: https://npm.io/package/@dimakorotkov/tinymce-mathjax

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.11 (latest) — 2024-02-21
- 1.0.10 — 2024-02-20
- 1.0.9 — 2024-02-20
- 1.0.8 — 2022-06-29
- 1.0.7 — 2021-04-09
- 1.0.6 — 2020-10-19
- 1.0.5 — 2020-10-14
- 1.0.4 — 2019-10-28
- 1.0.3 — 2019-10-25
- 1.0.2 — 2019-10-24
- 1.0.1 — 2019-10-22
- 1.0.0 — 2019-10-22

## README

# TinyMCE MathJax Plugin

<span class="badge-patreon"><a href="https://www.patreon.com/dimakorotkov" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
<span><a href="https://buymeacoff.ee/NXR1ZkP" title="Donate to this project using Buy Me A Coffee" rel="nofollow"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button"></a></span>

This plugin using [MathJax](https://www.mathjax.org) 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

* [Latest build](https://github.com/dimakorotkov/tinymce-mathjax/archive/master.zip)

## 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](https://www.mathjax.org) 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

---
_Source: https://npm.io/package/@dimakorotkov/tinymce-mathjax · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
