- Can I use this QuillJS bundle directly in Laravel without Symfony?
- This bundle is designed for Symfony, but you can integrate it into Laravel via the `laravel/symfony-bundle` bridge. However, you’ll need to manually handle form integration (e.g., custom Laravel form fields or Twig extensions) and asset management (Vite/Mix). For a pure Laravel solution, consider alternatives like standalone QuillJS with a custom service provider.
- How do I configure the toolbar buttons for Quill in Laravel?
- Edit `config/cws_quill_js.yaml` (create it if missing) and define the `toolbar` array with nested button groups, like `['bold', 'italic']` or `[{'list': 'ordered'}]`. The bundle reads this config automatically after enabling it in `config/app.php` via the Symfony bridge.
- Will this work with Laravel’s native Form::macro() or Livewire?
- No, this bundle assumes Symfony Forms. For Laravel, you’ll need to create a custom form field (e.g., a `QuillField` macro) or use Livewire properties to sync Quill’s state. The bundle doesn’t natively support Laravel’s form helpers or Livewire’s reactivity.
- How do I handle Quill’s HTML output safely in Laravel (XSS protection)?
- Sanitize Quill’s HTML output before storing it in the database using Laravel’s `Str::of(html)->sanitize()` or a library like `DOMPurify`. Add middleware or a form request rule to validate and escape the content before saving. Always escape output when rendering in Blade.
- Does this bundle support Laravel Mix or Vite for asset bundling?
- No, the bundle expects QuillJS to be loaded via CDN or manual inclusion. For Vite/Mix, configure your build tool to include Quill from `node_modules` or the CDN. Example: Add `quill` to `vite.config.js` under `build.rollupOptions.external` or bundle it directly.
- What Laravel versions are compatible with this Symfony bundle?
- Target Laravel 9+ (Symfony 5+ compatibility). Test thoroughly with `laravel/framework:^9.0` or later. Older Laravel versions may require additional Symfony compatibility layers or manual adjustments to the bundle’s dependencies.
- Are there alternatives to this bundle for Laravel?
- Yes. For a more Laravel-native approach, consider standalone QuillJS with a custom service provider or packages like `spatie/laravel-medialibrary` (for image uploads) paired with Quill. Alternatives like `ckeditor/ckeditor5-laravel` offer tighter Laravel integration but may lack Quill’s lightweight design.
- How do I integrate Quill with Laravel’s validation rules?
- Validate Quill’s HTML output in a Form Request using rules like `string|max:5000`. For custom validation (e.g., allowed tags), use a `Validator` extension or a package like `laravel-html-sanitizer`. Ensure the raw HTML is sanitized before validation to avoid false positives.
- Is this bundle actively maintained? What if I need advanced features (e.g., image uploads)?
- The bundle shows no recent maintenance (0 stars, no dependents). For advanced features like image uploads, you’ll need to extend the bundle or fork it. Consider wrapping Quill in a Laravel service provider for better control over customizations and dependency updates.
- Can I use this with Inertia.js or Alpine.js for reactive forms?
- Yes, but you’ll need to manually bind Quill’s events to Alpine.js/Inertia’s reactivity system. Use Alpine’s `@change` or Inertia’s `$page.props` to sync Quill’s content with your frontend state. The bundle itself doesn’t provide built-in support for these frameworks.