0.1.2 • Published 2 years ago

draft-js-latex-plugin v0.1.2

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

Draft.js LaTeX Plugin

A Draft.js plugin to render and edit LaTeX. Modified this KaTeX module to make it compatible with the widely used draft-js-plugins architecture.

Setup

npm i draft-js-latex-plugin

Usage

import { getLaTeXPlugin } from 'draft-js-latex-plugin'
import 'draft-js-latex-plugin/lib/styles.css'
import 'katex/dist/katex.min.css'

const LaTeXPlugin = getLaTeXPlugin()

const plugins = [LaTeXPlugin]

Key bindings

  • Press $ for starting Inline TeX
  • Press CMD + M for starting Tex Block
  • To write the $ character, type \$