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

rte-rich-text-editor-bundle

v1.0.19

Published

RTE Rich Text Editor + WebSocket connector bundled in a single file. One script tag. Zero dependencies.

Readme

RTE Bundle — Rich Text Editor + WebSocket

Everything in one file. RTE Rich Text Editor and the WebSocket connector bundled together. One script tag. Zero dependencies.

RTE Rich Text Editor

Install

npm

npm install rte-rich-text-editor-bundle

Script Tag

<script src="https://unpkg.com/rte-rich-text-editor-bundle/rte-bundle.js"></script>

CommonJS

const RTE = require('rte-rich-text-editor-bundle');
const editor = RTE.init('#editor');

ES Modules

import RTE from 'rte-rich-text-editor-bundle';
const editor = RTE.init('#editor');

Self-Hosted

<script src="rte-bundle.js"></script>

Quick Start

Editor Only

<div id="editor"></div>
<script src="rte-bundle.js"></script>
<script>
  const editor = RTE.init('#editor');
</script>

Editor + WebSocket

<div id="editor"></div>
<script src="rte-bundle.js"></script>
<script>
  const editor = RTE.init('#editor');

  const ws = RTEWS.connect(editor, 'wss://yourserver.com/ws', {
    docId: 'doc-123',
    userId: 'user-abc',
    onSaved: (msg) => console.log('Saved'),
    onRemoteUpdate: (msg) => console.log('Update from:', msg.userId),
  });
</script>

What's Included

| Global | Description | |---|---| | RTE | Rich text editor — formatting, media, tables, emoji, export | | RTEWS | WebSocket connector — auto-save, collaboration, reconnect |

Related Packages

| Package | Description | |---|---| | rte-rich-text-editor | Core editor — lightweight, 33 toolbar controls | | rte-rich-text-editor-ws | WebSocket connector for RTE | | rte-rich-text-editor-bundle | RTE + WebSocket in one file | | rte-rich-text-editor-pro | Pro editor — 16 toolbar groups, AI, slash commands, mentions | | rte-rich-text-editor-pro-ws | RTEPro + WebSocket in one file | | wskit-client | Universal WebSocket client | | websocket-toolkit | Universal WebSocket client (alternate name) |

Website: rte.whitneys.co · GitHub: MIR-2025/rte

Changelog

All notable changes to rte-rich-text-editor-bundle will be documented in this file.

[1.0.17] - 2026-02-18

  • Added "Link Text" field to Insert Link popup — set custom anchor text or leave blank to wrap selection

[1.0.16] - 2026-02-18

  • Added cleanHTML() for clean exports (strips resize classes, image overlays, contenteditable attributes)

[1.0.15] - 2026-02-18

  • Added Cut/Copy/Paste toolbar buttons and Ctrl+X/C support for selected images
  • Fixed color picker losing text selection on click (mousedown preventDefault)
  • Fixed toolbar tooltip z-index (tooltips no longer hidden behind next row of buttons)

[1.0.14] - 2026-02-18

  • Version bump for README updates

[1.0.13] - 2026-02-18

  • Added filename input to export bar for custom export filenames

[1.0.12] - 2026-02-18

  • Added cross-links to all 7 npm packages in README

[1.0.11] - 2026-02-18

  • Added Tab key navigation in tables (Tab = next cell, Shift+Tab = previous cell)
  • Tab at last cell automatically creates a new row

[1.0.10] - 2026-02-18

  • Added CHANGELOG.md to package, appended changelog to README

[1.0.9] - 2026-02-18

  • Version bump for README updates

[1.0.8] - 2026-02-17

  • Synced with rte-rich-text-editor 1.0.17 (exportCSS, exportTemplate, responsive media)

[1.0.7] - 2026-02-17

  • Media responsive: images, video, and audio scale with max-width: 100% and height: auto

[1.0.6] - 2026-02-17

  • Added changelog to README

[1.0.5] - 2026-02-17

  • Added explicit type="button" to all editor buttons to prevent form submission

[1.0.4] - 2026-02-17

  • Added type="button" via el() helper to prevent form submission when editor is inside a <form>

[1.0.3] - 2026-02-17

  • Synced with rte-rich-text-editor 1.0.12 (image resize, content overflow, vertical resizing)

[1.0.2] - 2026-02-16

  • Added CommonJS and ES Modules usage examples to README

[1.0.1] - 2026-02-16

  • Added TypeScript declarations (rte-bundle.d.ts) for both RTE and RTEWS
  • Added exports, module, and types fields to package.json

[1.0.0] - 2026-02-16

  • Initial release — RTE editor + WebSocket connector bundled in a single file

Security

Treat editor output as untrusted if any untrusted users can write content.

  • Sanitize server-side before storing or rendering. The editor outputs raw HTML — always run it through a sanitizer (e.g. DOMPurify, sanitize-html) before persisting or displaying to other users.
  • Disallow dangerous patterns: javascript: links, inline event handlers (onclick, onerror, etc.), <iframe>, <script>, <object>, <embed>, and <form> tags.

License

MIT