aequation/editorjs
Symfony bundle integration for Editor.js. Provides tools and configuration to embed the Editor.js block-style editor in Symfony apps, enabling structured content editing and storage with a simple setup.
EditorJsType or EditorJsBundle behavior.UploadedFile or VichUploaderBundle. Laravel alternatives (e.g., laravel-filemanager, custom S3 uploads) would need mapping.FormType system must be replaced with Laravel’s FormRequest or custom validation logic.EditorJsType) to Laravel’s ecosystem (e.g., Form Requests, Livewire/Inertia for frontend) could introduce bugs or require significant refactoring.| Layer | Current (Symfony) | Laravel Equivalent | Compatibility Notes |
|---|---|---|---|
| Frontend | Twig + Editor.js CDN/npm | Blade/Inertia/Livewire + Editor.js CDN/npm | Minimal change; ensure JS/CSS paths are correct. |
| Backend API | Symfony Controller + FormType | Laravel Controller + FormRequest/Validator | Replace EditorJsType with custom validation. |
| Uploads | VichUploaderBundle/Symfony Upload | Laravel Filesystem (S3/local) + custom logic | Map Symfony’s UploadedFile to Laravel’s Request->file(). |
| Database | Doctrine ORM (JSON column?) | Eloquent (JSON casting or custom accessors) | Use json column type or Laravel’s HasJson trait. |
| Dependency Injection | Symfony DI Container | Laravel Service Container | Manually bind services or use Laravel’s bind() method. |
Phase 1: Decouple Editor.js
save() events to send data to Laravel backend.Phase 2: Reimplement Symfony Logic
EditorJsType with a Laravel FormRequest or custom validator.json_validate() or a library like spatie/laravel-json-validate.Request->file() to process uploads.Storage::disk('s3')->put().longtext column or use Eloquent accessors.class Post extends Model {
protected $casts = ['editor_content' => 'json'];
}
Phase 3: Optional Laravel Package
symfony/form → illuminate/validation).aequation/editorjs-laravel).image, code), ensure they’re compatible with Laravel’s asset pipeline (Vite/Mix may need config adjustments).save() events and uploads.spatie/laravel-editorjs).EditorJsType not found) will require deep knowledge of both frameworks.publicPath in Vite to avoid 404s on tool assets.code, embed).editor_content).How can I help you explore Laravel packages today?