0.4.2 • Published 2 years ago

@zhyd1997/draftjs-to-latex v0.4.2

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

draftjs-to-latex

codecov

NPM npm (scoped)

npm npm npm

Convert Draftjs content to LaTeX source code.

Features

Block TypeSupportedBlock EnumNotes
Bold✅ YesBOLD
Italic✅ YesITALIC
Underline✅ YesUNDERLINE
Inline Code✅ YesCODE
H1✅ Yesheader-one
H2✅ Yesheader-two
H3✅ Yesheader-three
UL✅ Yesunordered-list-itemonly support for continuous list
OL✅ Yesordered-list-itemonly support for continuous list
Equation✅ YesMATHusing 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
0.4.2

2 years ago

0.3.2

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago