You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each block has a PHP class that defines its attributes, validation rules, server-side rendering (Blade and React) and the JS module that implements it in the editor. A block registry that apps and other packages register blocks with.
Done on main. The contract is on the epic: #14 (comment)
Javaabu\BlockEditor\Blocks\Block defines the name, group, content expression, allowed marks, attributes() (Attribute::string()/url()/enum()/… with defaults, rules, settings inputs and Thaana), rules(), sanitize(), render() (Blade view), $script (the manifest asset with the JS half) and menu metadata. The registry is the BlockEditor facade (register, forget, profile, editorConfig, scripts).
The React half is defineBlock({ name, extensions, render, insert, … }) + registerBlock(), in a registry shared on globalThis. Decision: a block with only a PHP class still works in the editor. A generic node is built from its config (a card plus the settings panel for leaves, an outlined area for text and containers), so the JS module is optional.
Activity
PHP block classes, registry, sanitizing, validation and Blade rendering
n4ff4h commentedon Nov 5, 2026
Done on
main. The contract is on the epic: #14 (comment)Javaabu\BlockEditor\Blocks\Blockdefines the name, group, content expression, allowed marks,attributes()(Attribute::string()/url()/enum()/…with defaults, rules, settings inputs and Thaana),rules(),sanitize(),render()(Blade view),$script(the manifest asset with the JS half) and menu metadata. The registry is theBlockEditorfacade (register,forget,profile,editorConfig,scripts).The React half is
defineBlock({ name, extensions, render, insert, … })+registerBlock(), in a registry shared onglobalThis. Decision: a block with only a PHP class still works in the editor. A generic node is built from its config (a card plus the settings panel for leaves, an outlined area for text and containers), so the JS module is optional.