npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@raazkhnl/rk-editor-core

v4.6.0

Published

Free open-source headless rich-text Word editor for the web. Built on Tiptap & ProseMirror with first-class DOCX export, true PDF/print, page layout, find & replace, track changes, draggable text boxes, image resize, and Markdown/HTML import-export. Frame

Readme

@raazkhnl/rk-editor-core

Headless, framework-agnostic rich-text Word editor engine for the web. Built on Tiptap and ProseMirror — fully MIT-licensed, no paywalled features, no telemetry.

npm npm downloads License: MIT TypeScript

The headless engine for RK Word Editor — a free, open-source Microsoft Word / Google Docs alternative for the web that you can drop into any application: Vanilla JS, React, Vue, Svelte, Angular, Next.js or Web Component.


Why RK Word Editor?

| | RK Word Editor | TinyMCE / Froala | Quill | Lexical | | --- | :---: | :---: | :---: | :---: | | MIT, no paid tier | ✅ | ❌ | ✅ | ✅ | | Real DOCX export with images, tables, lists | ✅ | 💲 paid | ❌ | ❌ | | True isolated PDF / print pipeline | ✅ | 💲 paid | ❌ | ❌ | | Page layout (A4/Letter, margins, orientation) | ✅ | 💲 paid | ❌ | ❌ | | Find & replace with regex | ✅ | 💲 paid | ❌ | ❌ | | Track changes | ✅ | 💲 paid | ❌ | ❌ | | Draggable, resizable text boxes | ✅ | ❌ | ❌ | ❌ | | Image resize handles + drag-and-drop upload | ✅ | ✅ | ❌ | ❌ | | Headless / framework-agnostic | ✅ | ✅ | ✅ | ✅ | | Slash commands /heading, /table … | ✅ | ❌ | ❌ | ✅ |

Install

npm install @raazkhnl/rk-editor-core

If you also want the included Word-style toolbar / menubar / dialogs, install @raazkhnl/rk-editor-ui.

Quick start

import { WordEditor } from '@raazkhnl/rk-editor-core';

const editor = new WordEditor({
  element: document.getElementById('editor')!,
  initialContent: '<p>Hello, world!</p>',
  placeholder: 'Start typing here…',
});

// Format API
editor.format.bold();
editor.format.heading(1);
editor.format.bulletList();
editor.format.insertTable({ rows: 3, cols: 3, withHeaderRow: true });
editor.format.insertTextBox();          // floating, draggable text box
editor.format.setColor('#1d4ed8');

// I/O
await editor.exportDocx('report.docx');     // ✅ Real .docx, opens in Word
editor.printPdf({ pageLayout: { pageSize: 'A4', orientation: 'portrait' }});
editor.exportMarkdown();
editor.exportHtml();
await editor.importFromFile(file);          // .docx | .md | .html | .json | .txt

// Collaboration helpers
editor.toggleTrackChanges();
const stop = editor.enableAutoSave('my-doc');

// Stats
editor.getWordCount();        // { words, characters, paragraphs, sentences, pages, readingTimeMinutes }
editor.getTableOfContents();  // [{ level, text, id }]

What ships in this package

  • WordEditor class — the main façade.
  • CommandManager — high-level format API (bold(), heading(), align(), …).
  • ExportEngine — produces real DOCX with embedded images, hyperlinks, tables, lists (incl. Nepali numbering), task lists, footnotes. toBlob() API for piping the document elsewhere.
  • ImportEngine — DOCX (via mammoth), Markdown (via marked), HTML, JSON, plain text.
  • PrintEngine — isolated-iframe print → properly paginated PDF via the browser's native dialog. Defaults to A4 portrait.
  • StyleManager, DocumentValidator.
  • 30+ Tiptap extensions: tables, images with resize handles, multilevel lists, Nepali numbering, footnotes, citations, bibliography, table of contents, math (LaTeX), captions, page breaks, page layout, header/footer, line height, indent, font size, font family, text transform, advanced typography, slash commands (/heading, /table, …), drag handles, format painter, track changes, find & replace, draggable & resizable text boxes, paste handler, Word keyboard shortcuts, and more.

Framework integrations

// Vanilla
import { WordEditor } from '@raazkhnl/rk-editor-core';

// React
useEffect(() => { const e = new WordEditor({ element: ref.current! }); return () => e.destroy(); }, []);

// Vue
onMounted(() => { editor = new WordEditor({ element: el.value! }); });

// Svelte / Angular / Solid — same pattern: ref → new WordEditor()

For a fully-featured drop-in (toolbar + menubar + status bar + outline + dialogs) use @raazkhnl/rk-editor-ui's EditorShell or <rk-word-editor> web component.

Documentation

License

MIT © RaaZ Khanal. Use it commercially, fork it, vendor it — all without restriction.