Lexical Field Hooks

Makes field-level hooks on blocks inside Lexical rich text fields run

Community 0 4/wk MIT v0.0.4

Installation

pnpm add @maxmorozoff/payload-plugin-lexical-field-hooks

About

Lexical Field Hooks fixes a gap in Payload where field-level hooks defined on blocks inside a Lexical rich text field do not fire as expected. The plugin wraps those hooks so that they run for each block node in the editor content, which lets hooks such as value transforms or lookups work on block data. It applies to collections and globals that use a Lexical rich text field with the blocks feature. You can limit which collections, globals, fields or hooks get the fix through filter options.

Package info

Package name
@maxmorozoff/payload-plugin-lexical-field-hooks
Latest version
0.0.4
Unpacked size
83 kB
License
MIT
Weekly downloads
4
Last publish
Mar 23, 2024

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