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.
Maintainers
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.

Install
npm
npm install rte-rich-text-editor-bundleScript 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%andheight: 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"viael()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, andtypesfields 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
