@zhyd1997/draftjs-to-latex
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

draftjs-to-latex

codecov

NPM npm (scoped)

npm npm npm

Convert Draftjs content to LaTeX source code.

Features

Block Type Supported Block Enum Notes
Bold Yes BOLD
Italic Yes ITALIC
Underline Yes UNDERLINE
Inline Code Yes CODE
H1 Yes header-one
H2 Yes header-two
H3 Yes header-three
UL Yes unordered-list-item only support for continuous list
OL Yes ordered-list-item only support for continuous list
Equation Yes MATH using katex for rendering
Image Missing
Table Missing
Code Snippet Missing

Limitations

Not support overlapping styles.

Usage

npm i @zhyd1997/draftjs-to-latex
# yarn
yarn add @zhyd1997/draftjs-to-latex

Only support ES6:

import { scan } from "@zhyd1997/draftjs-to-latex";

const generatedTex = scan(contentState);
// console.log(generatedTex);

Development

npm install
npm test

Readme

Keywords

Package Sidebar

Install

npm i @zhyd1997/draftjs-to-latex

Weekly Downloads

0

Version

0.4.2

License

MIT

Unpacked Size

14.8 kB

Total Files

9

Last publish

Collaborators

  • lu1121