Code Block Feature

Adds a code block to the rich text editor with syntax highlighting

Community 11 6/wk MIT v0.0.0-alpha.0

Installation

pnpm add payload-code-block-feature

About

Code Block Feature adds a code block to the rich text editor in Payload, so editors can write snippets with monospaced text and syntax highlighting. It appears in the slash menu and the floating toolbar, and selected text can be turned into a code block in one step. It is a stopgap for teams that need code blocks before they ship in Payload's own rich text editor, and the author does not plan new features or automated tests for it.

Package info

Package name
payload-code-block-feature
Latest version
0.0.0-alpha.0
Unpacked size
40 kB
License
MIT
Weekly downloads
6
Last publish
Dec 10, 2023

More from GeorgeHulpoi

View profile

Adds TOTP two-factor codes to a Payload auth collection login

Protects Payload collection operations with Google reCAPTCHA v3 score checks

Similar plugins

More in Editor

Editor-authored URL routing that maps collections to path patterns and links

Adds AI text, translation, image and voice generation to Payload fields and the editor

Adds AI text, image and voice generation and translation to Payload editors

Translates Payload documents into other locales with LibreTranslate in the background

Adds Mermaid diagram blocks to rich text with server-rendered SVG output

Code-defined transactional emails with admin-editable copy, test sends and a send log