Installation
Compatibility
| Filament version | Package version |
|---|---|
| 4.x | 1.x |
| 4.x & 5.x | 2.x |
Richer Editor requires PHP 8.2 or later, the dom extension, and filament/forms. It also pulls in phiki/phiki for server-side syntax highlighting and league/html-to-markdown for Markdown output.
Requiring the package
Install the package via Composer:
composer require awcodes/richer-editor
Registering the styles
Richer Editor ships its own stylesheet as well as Blade views, and both need to reach your compiled CSS.
Important
If you have not set up a custom theme and are using Filament Panels, follow the instructions in the Filament documentation first.
Add both lines to your theme's CSS file — or your application's CSS file if you are using the standalone packages:
@import '../../../../vendor/awcodes/richer-editor/resources/css/index.css';
@source '../../../../vendor/awcodes/richer-editor/resources/views/**/*.blade.php';
Adjust the relative paths if your CSS file does not live in the default theme location.
The @import is not optional if you use syntax-highlighted code blocks: the dark-mode switching for both the editor and rendered output is defined in that stylesheet. See Code blocks.
Nothing else needs registering — plugins are added per field, as shown in Plugins.