Filament Markdown Editor

Packages

October 14th, 2022

Filament Markdown Editor

Filament Markdown Editor is a markdown editor for the excellent Filament admin panel. You can quickly install this package and get markdown editing support with code highlighting, image uploads, and more:

Filament markdown editor code example

To get started, here's an example of defining a form function for a Filament resource as seen in the readme:

use Spatie\FilamentMarkdownEditor\MarkdownEditor;
 
public static function form(Form $form): Form
{
return $form
->schema([
// other fields ...
 
MarkdownEditor::make('text')
->fileAttachmentsDisk('admin-uploads')
->fileAttachmentsVisibility('public')
->required(),
]);
}

As seen in the code example, you can call Filament methods to configure attachments. The form field also supports drag and drop images onto the editor.

To get started with this package, check out the readme and source code on GitHub.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.