HTML Editor

Adds a Tiptap-based visual HTML editor field that stores HTML strings in a Payload textarea field.

Community 0 527/wk MIT v0.1.4

Installation

pnpm add payload-html-editor

About

This plugin adds an `htmlEditorField` to Payload CMS 3 collections and globals. Editors get a toolbar for bold and italic text, headings, lists, links, text alignment, and tables. The editor runs on Tiptap, and the saved value is an HTML string in a standard Payload `textarea` field. Teams that already render HTML, or that want to keep content out of Lexical's JSON format, can use it without changing their output pipeline. The plugin registers through `htmlEditorPlugin({ mediaCollection })`, which sets the upload collection used for images. Each field can override that collection and set a `maxUploadSize` in bytes (10 MB by default). Image insertion, the media library picker, tables, text alignment, and the HTML source modal are all on by default. Setting `features.images`, `features.tables`, `features.sourceEditing`, or `features.textAlignment` to `false` on a field removes the matching toolbar controls and Tiptap extensions for that field. Image uploads go through Payload's REST API with the signed-in admin's credentials and accept JPEG, PNG, WebP, and GIF files. The package does not sanitize HTML. Tiptap's schema limits which tags and attributes survive a parse and save, but output sanitization still belongs in the application, especially when untrusted users can write content. Migrating existing WordPress or CKEditor markup may need conversion, since unsupported tags are dropped when Tiptap saves. Payload 3.90, React 19.2, and Tiptap 3.31 are peer dependencies, and the import map must be regenerated after the field is added.

Package info

Package name
payload-html-editor
Latest version
0.1.4
Unpacked size
68 kB
License
MIT
Weekly downloads
527
Last publish
Oct 12, 2026

Similar plugins

More in Editor