Release notes · September 21, 2026

RichTextEditor 2.12.0

Base64 images are resized and capped instead of filling your database, a failed upload no longer leaves a full-size copy behind, uploads stop coming out centred, and Markdown import is fixed. Core 2.6.4 → 2.6.5 (617,290 bytes).

Latest
2.12.0

Base64 images are shrunk and capped (behaviour change)

With no upload handler, an inserted image goes into the HTML as a base64 data:URL. It used to go in at full size, so a phone photo was 3–5 MB of text in every saved post. The editor now resizes it in the browser first — measured, a 4.3 MB 4000×3000 photo became 1600×1200 and 129 KB — and refuses anything still over the cap with a message that names the fix. The settings are allowBase64Images (true), base64ImageMaxSize (204800 bytes), base64ImageShrink (true) and base64ImageMaxDimension (1600). For the old behaviour, set base64ImageMaxSize = 0 and base64ImageShrink = false. See image storage.

A failed upload now removes the image and shows the error. Older cores silently kept a full-size base64 copy, which is how large images reached databases even with a handler. The image toolbar’s Replace button now uploads too, instead of always embedding.

Uploads came out centred after one centred image

Centring an image centres its paragraph, and Enter copied that alignment onto the next paragraph, so every later line and upload was centred. Enter from a paragraph holding only images now starts without alignment; centred text still carries over.

Bold after superscript

Superscript and subscript left the browser’s styleWithCSS flag on, so Bold, Italic and Underline then saved <span style> instead of <b>, <i> and <u>. The flag is now restored.

Markdown import

Entities such as &copy;stay entities, a paragraph’s lines stay one paragraph, and hard breaks, setext headings, indented code, code spans with backticks, link titles and autolinks work. Our CommonMark conformance script: 45/45, up from 31/45.

Insert Gallery, security, download demos

Gallery uploads now honour maxUploadFileSize, a batch keeps going past a failed file, and insertImageByUrl(url, alt) takes alt text. AI Toolkit sanitises HTML from a shared suggestion ledger and drops fixed positioning from it; the sanitizer no longer lets an iframe widen its own sandbox. Every download demo now sets its image options, explained in its IMAGE-UPLOAD.md.

Install or upgrade

Grab the latest via npm:

npm install @richscripts/richtexteditor@latest

Feedback & issues: support@richtexteditor.com