This is a plugin for the draft-js-plugins-editor
.
This plugin insert and render LaTeX using KaTeX, modified from TeX example.
- Integrated with Khan/math-input.
Add MathQuill libs
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathquill/0.10.1/mathquill.min.js"></script>
Add plugin
import createKaTeXPlugin from 'draft-js-katex-plugin';
const kaTeXPlugin = createKaTeXPlugin();
const { InsertButton } = kaTeXPlugin;