Petra
AI assistant for GrootMade
Hi! I'm Petra 👋 Ask me to help you find the perfect WP plugin, theme, or template kit.
forked from Gutenberg Example™
NarrativePress is not affiliated with Gutenberg Example. The name and any related trademarks are used solely for nominative descriptive purposes.
This repository provides a set of working examples for developers learning to create custom blocks for the modern content editor. It is aimed at developers who need to understand the practical implementation of blocks using different technologies, from React to PHP.
Basic React Block: A foundational example showing a simple, static block built with React components. Editable Text Control: Extends the basic block to include a text field that users can edit within the editor interface. PHP-based Block: Demonstrates how to register and render a block using PHP, offering an alternative to the React-based approach. Edit/Preview Toggle: Implements a toggle that allows developers to switch between editing a block and previewing its final appearance directly in the editor. Scoped Preview with iFrame: An experimental method that renders a block preview inside an isolated iFrame to prevent CSS and JavaScript conflicts with the admin environment.
Version
Original
Updated