Pros:
EmbedPlugin, HighlightedCodeBlock) are decoupled, allowing selective adoption without bloating the editor.HighlightedCodeBlock) and tools (e.g., ToolGroup), enabling domain-specific extensions (e.g., analytics annotations).toHtml(), toMarkdown(), TableOfContents), aligning with Laravel’s templating (Blade) and API-first needs.Cons:
CodeBlockShikiPlugin or VideoPlugin are marked experimental, requiring validation for production use.@import in app.css), adding minor dev overhead.phiki for code blocks, league/html-to-markdown for conversion), avoiding heavy JS bundles.RichContent model, ensuring compatibility with Laravel’s Eloquent and database migrations.HighlightedCodeBlock themes).phiki (code blocks) and league/html-to-markdown are stable but may introduce minor breaking changes.toHtml() with custom blocks may add ~10–30ms latency (negligible for most use cases).FakerPlugin avoids runtime overhead in production.HighlightedCodeBlock) should validate input (e.g., Phiki’s Theme enum).EmbedPlugin uses iframe sandboxes; validate allowed domains (e.g., YouTube, Vimeo).EmbedPlugin vs. TableOfContents)?VideoPlugin) acceptable for Phase 1, or should they be deferred?HighlightedCodeBlock)?toMarkdown() be used for API responses, or is toHtml() sufficient?TableOfContents be surfaced (e.g., as a sidebar component)?SourceCodePlugin UTF-8 issues)?FakerPlugin) be validated?ckeditor, trix) to identify gaps (e.g., missing tables, code blocks).Page model) to test:
EmbedPlugin + YouTube links).toHtml() vs. toMarkdown()).FakerPlugin for test data generation (local-only).Embed, Link, SourceCode) + custom blocks (e.g., HighlightedCodeBlock).TableOfContents) after validation.ToolGroup for domain-specific actions).trix.| Component | Compatibility | Mitigation |
|---|---|---|
| Filament Version | v4.x (v1.x) / v5.x (v2.x) | Pin to exact minor version (e.g., filament/filament:^5.0). |
| Laravel Version | 10.x+ (tested) | Use ^10.0 in composer.json to avoid breaking changes. |
| Database | Eloquent RichContent fields |
No changes needed; uses Filament’s default storage. |
| Frontend | Alpine.js/Vue (Filament’s default) | No conflicts; assets auto-loaded via Filament’s resource system. |
| Custom Blocks | Requires RichContentRenderer configuration |
Document block schemas (e.g., HighlightedCodeBlock themes) in DB migrations. |
| Experimental Plugins | VideoPlugin, CodeBlockShikiPlugin (unstable) |
Disable in production until tested. |
composer require awcodes/richer-editor.resources/css/app.css or Filament’s theme.php artisan vendor:publish --tag=richer-editor.RichEditor in a Form component (e.g., app/Filament/Resources/PageResource.php):
use Awcodes\RicherEditor\Plugins\EmbedPlugin;
RichEditor::make('content')
->plugins([EmbedPlugin::make()])
->toolbarButtons(['embed']);
RichContentRenderer in a Service Provider or Controller:
use Awcodes\RicherEditor\Blocks\HighlightedCodeBlock;
RichContentRenderer::make($content)
->customBlocks([HighlightedCodeBlock::class => ['light' => Theme::GithubLight]])
->toHtml();
phiki and league/html-to-markdown for breaking changes.composer.json to avoid surprises.How can I help you explore Laravel packages today?