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:

1use Spatie\FilamentMarkdownEditor\MarkdownEditor;
2 
3public static function form(Form $form): Form
4{
5 return $form
6 ->schema([
7 // other fields ...
8 
9 MarkdownEditor::make('text')
10 ->fileAttachmentsDisk('admin-uploads')
11 ->fileAttachmentsVisibility('public')
12 ->required(),
13 ]);
14}

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.