- How do I install filament-tinyeditor in a Laravel Filament application?
- Install the package with Composer using the major version that matches your Filament version, such as composer require amidesfahani/filament-tinyeditor:^4.0 for Filament 4. Then publish the provider assets and optionally the config, views, and public tags with the documented artisan vendor:publish commands. Finally add TinyEditor::make('content') to your Filament form schema.
- Which Filament, Laravel, and PHP versions are supported by filament-tinyeditor?
- The package follows a strict version matrix. Package 5.x targets Filament 5, Laravel 12, and PHP 8.2+. Package 4.x targets Filament 4, Laravel 11, and PHP 8.2+, while 3.x targets Filament 3, Laravel 10+, and PHP 8.1+. Match the package major to your application stack before installing.
- How do I add a TinyMCE editor field to a Filament form?
- Use the TinyEditor class inside your Filament form schema, for example TinyEditor::make('content'). Because it extends Filament's Field class, normal methods like required(), columnSpan('full'), and validation still work. You can chain editor options such as profile(), rtl(), and resize() directly on the field.
- How do I customize TinyMCE toolbar profiles in filament-tinyeditor?
- Publish the package config and edit the profiles array to change plugins, external_plugins, and toolbar strings. The package ships default, simple, full, minimal, none, and custom profiles, and you can use the pipe character to group toolbar buttons. Call profile('simple') or another profile name on the TinyEditor field to select it.
- Does filament-tinyeditor support RTL direction and editor resizing?
- Yes. You can call rtl() on the field or use direction('auto|rtl|ltr') to control text direction. Resizing is supported through resize('both') or other resize modes. These methods are chainable alongside standard Filament field configuration.
- How do I configure file attachments and image uploads in filament-tinyeditor?
- Use fileAttachmentsDisk('public'), fileAttachmentsVisibility('public'), and fileAttachmentsDirectory('uploads') to control where uploaded files are stored. The package provides the editor integration, but your Laravel application remains responsible for MIME validation, quotas, access control, and cleanup. For compliance-sensitive use, add server-side sanitization and upload hardening.
- Can I load external TinyMCE plugins with filament-tinyeditor?
- Yes, the config supports an external_plugins array, and the README shows loading a plugin from unpkg. That introduces supply-chain, availability, and CSP review requirements. For production, consider pinning versions and self-hosting all editor JavaScript rather than relying on a third-party CDN.
- Is filament-tinyeditor production-ready for customer-facing content authoring?
- It is best treated as a conditional fit for internal Filament admin forms where the version matrix matches. Customer-facing authoring raises the security bar because rich-text HTML and image uploads are high-risk inputs. Your team must own server-side HTML sanitization, upload validation, CSP allowances, and regression testing before production use.
- How do I test Filament forms that use TinyEditor?
- Use Laravel and Livewire form tests to assert that the TinyEditor field exists, validation rules run, and form state is saved correctly. The editor's JavaScript behavior is not exercised in standard PHP tests, so add browser tests if toolbar, attachment, or Livewire interactions are critical. The package materials do not show visible test or CI coverage, so your application should include its own regression tests.
- What alternatives exist to filament-tinyeditor for WYSIWYG editing in Filament?
- Filament includes RichEditor, which is based on TipTap and avoids a separate TinyMCE dependency. Other community packages may wrap CKEditor, Trix, or TinyMCE differently. Compare feature needs, Filament version support, asset hosting, licensing, and maintenance activity before choosing.