© 2026 Hedgehog Software, LLC
<?php /* ... */ class HeroBlock extends RichContentCustomBlock { /* ... */ public static function configureEditorAction(Action $action): Action { return $action ->modalDescription('Configure the hero block') ->schema([ TextInput::make('heading') // ->default('default value') ->default(fn() => 'default value') ->required(), TextInput::make('subheading'), ]); } /* ... */ }
<?php /* ... */ class PostForm { public static function configure(Schema $schema): Schema { return $schema ->components([ /* ... */ RichEditor::make('content') ->customBlocks([ HeroBlock::class, ]) ->columnSpanFull() ->required(), ]); } }