Vibeleaderboard
Index / tool

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.

Suggest an improvement

Similar tools

Browse all tools →

Tags

javascripttypescripteditorclipboardlatexhtml

Tech Stack

Node.jsTypeScript

Media

wordpaste

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.