tarjei / draft-js-katex-plugin

A Katex plugin for DraftJS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DraftJS KaTeX Plugin

This is a plugin for the draft-js-plugins-editor.

This plugin insert and render LaTeX using KaTeX, modified from TeX example.

Usage

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;

About

A Katex plugin for DraftJS.


Languages

Language:JavaScript 95.8%Language:CSS 2.9%Language:Python 1.3%