wordpaste
github.com- Category
- Developer Tools
- Rank
- No. 2947Tools index
- Type
- TOOL
- Use case
- Data Processing
- GitHub
- 10 stars
- Date
About
A JavaScript library that transforms clipboard HTML from document editors and can convert supported equations to LaTeX. Rendering the math and sanitizing untrusted output are separate steps.
At a glance
wordpaste transforms clipboard HTML for web editors. It rebuilds supported Word lists and turns recoverable equation markup into LaTeX that a math-aware editor can keep editable. It is worth evaluating if authors paste technical documents into your app. Plan for separate rendering and HTML sanitization.
Good fit
Developers who need a cleaner paste path for course material, quizzes or documentation. Word's list markers can become real nested lists, so numbering can follow edits. When the clipboard includes structured math such as Word's OMML or MathML, the transform can preserve the formula as data instead of leaving only a picture.
Consider something else when
You need a complete .docx importer, pixel-for-pixel styling, or editable equations from images alone. The paste transform accepts HTML. The separate ommlToLatex export accepts a math fragment that your importer has already extracted; it does not open the document container.
Start here
Pin a published release and wire transformPastedHTML into the Tiptap or ProseMirror paste hook. Test with a synthetic Word fraction and a numbered list in your own test editor. Look for a data-latex value and real list nodes; Tiptap needs its Mathematics extension to render and edit the equation. Sanitize output before directly inserting or sharing HTML, keeping only the math attributes your renderer needs.
Cost and requirements
MIT licensed, with no runtime dependencies in the published package manifest. The converter needs a DOM parser; browser use has one, while Node needs a compatible DOM implementation. Math rendering and any clipboard-image upload or storage are separate integration work. The library takes and returns strings, and your application decides how to store and share the result.
Limits to know
On November 5, npm listed 0.12.1 while the hosted playground and converter imported unavailable 0.13.0. The editor did not load and a synthetic equation produced no output there; no local package was installed. Test the published release in your editor rather than relying on that demo. Formatting cleanup can retain dangerous markup and remote image references; it is not a security boundary. Local file image links are dropped.
Sources checked 2026-11-05. Source-based assessment.
- github.com/smrifat1411/wordpaste/blob/21b5b0ae2b23fd9b954013605fa0f2840a603ef2/README.md
- github.com/smrifat1411/wordpaste/blob/8efd28696fe8992489e73d7ccdbc7a7bb79a761a/package.json
- github.com/smrifat1411/wordpaste/blob/8efd28696fe8992489e73d7ccdbc7a7bb79a761a/src/index.ts
- github.com/smrifat1411/wordpaste/blob/21b5b0ae2b23fd9b954013605fa0f2840a603ef2/SECURITY.md
- github.com/smrifat1411/wordpaste/blob/8efd28696fe8992489e73d7ccdbc7a7bb79a761a/src/word-paste-cleaner.ts
- github.com/smrifat1411/wordpaste/blob/8efd28696fe8992489e73d7ccdbc7a7bb79a761a/src/omml-to-latex.ts
- smrifat1411.github.io/wordpaste/
- smrifat1411.github.io/wordpaste/omml-to-latex.html
- registry.npmjs.org/wordpaste/latest
- smrifat1411.github.io/wordpaste/omml-to-latex.html
Similar tools
Tags
Tech Stack
Media
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.