PHPackages                             malzariey/filament-lexical-editor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. malzariey/filament-lexical-editor

ActiveLibrary[Templating &amp; Views](/categories/templating)

malzariey/filament-lexical-editor
=================================

Implementation of meta's lexical editor in FilamentPHP, a modern, extensible text editor framework.

2.1.0(3mo ago)1516.7k↓23.3%6[1 PRs](https://github.com/malzariey/filament-lexical-editor/pulls)MITCSSPHP ^8.1CI passing

Since Jan 5Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/malzariey/filament-lexical-editor)[ Packagist](https://packagist.org/packages/malzariey/filament-lexical-editor)[ Docs](https://github.com/malzariey/filament-lexical-editor)[ GitHub Sponsors](https://github.com/malzariey)[ RSS](/packages/malzariey-filament-lexical-editor/feed)WikiDiscussions x4 Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (10)Used By (0)

Filament Lexical Editor.
========================

[](#filament-lexical-editor)

[![Latest Version on Packagist](https://camo.githubusercontent.com/54a3c9ece0bc0e5395c1d28d2dfdb04e3e56ca0f89e9121bbf49a4cf8bb6b606/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616c7a61726965792f66696c616d656e742d6c65786963616c2d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/malzariey/filament-lexical-editor)[![Total Downloads](https://camo.githubusercontent.com/90ba51894c0d2ab2b05633b2c5562def59448bba7e10a5579b3af165acb5497b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616c7a61726965792f66696c616d656e742d6c65786963616c2d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/malzariey/filament-lexical-editor)

This package provides an implementation of Meta's Lexical Editor within the FilamentPHP framework. It offers a modern, extensible text editor that can be easily integrated into your FilamentPHP projects.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require malzariey/filament-lexical-editor
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-lexical-editor-views"
```

Screenshots
===========

[](#screenshots)

### Light mode

[](#light-mode)

[![FilamentLexicalEditor Light](https://raw.githubusercontent.com/malzariey/filament-lexical-editor/refs/heads/x3/raw/main/art/light.png)](https://raw.githubusercontent.com/malzariey/filament-lexical-editor/refs/heads/x3/raw/main/art/light.png)

### Dark mode

[](#dark-mode)

[![FilamentLexicalEditor Dark](https://raw.githubusercontent.com/malzariey/filament-lexical-editor/refs/heads/x3/raw/main/art/dark.png)](https://raw.githubusercontent.com/malzariey/filament-lexical-editor/refs/heads/x3/raw/main/art/dark.png)

Usage
-----

[](#usage)

Use the `LexicalEditor` field in your form schema to add the Lexical Editor to your form.

```
    use Malzariey\FilamentLexicalEditor\LexicalEditor;

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                LexicalEditor::make('content'),
            ]);
    }
```

Customize Toolbar
-----------------

[](#customize-toolbar)

You can customize the toolbar by using the `enabledToolbars` method. The method accepts an array of ToolbarItem constants. The following is a list of available toolbar items:

```
    use Malzariey\FilamentLexicalEditor\LexicalEditor;

    LexicalEditor::make('content')
        ->enabledToolbars([
            ToolbarItem::UNDO, ToolbarItem::REDO,ToolbarItem::FONT_FAMILY, ToolbarItem::NORMAL, ToolbarItem::H1, ToolbarItem::H2, ToolbarItem::H3,
            ToolbarItem::H4, ToolbarItem::H5, ToolbarItem::H6, ToolbarItem::BULLET, ToolbarItem::NUMBERED, ToolbarItem::QUOTE,
            ToolbarItem::CODE, ToolbarItem::FONT_SIZE, ToolbarItem::BOLD, ToolbarItem::ITALIC, ToolbarItem::UNDERLINE,
            ToolbarItem::ICODE, ToolbarItem::LINK, ToolbarItem::TEXT_COLOR, ToolbarItem::BACKGROUND_COLOR, ToolbarItem::LOWERCASE,
            ToolbarItem::UPPERCASE, ToolbarItem::CAPITALIZE, ToolbarItem::STRIKETHROUGH, ToolbarItem::SUBSCRIPT, ToolbarItem::SUPERSCRIPT,
            ToolbarItem::CLEAR, ToolbarItem::LEFT, ToolbarItem::CENTER, ToolbarItem::RIGHT, ToolbarItem::JUSTIFY, ToolbarItem::START,
            ToolbarItem::END, ToolbarItem::INDENT, ToolbarItem::OUTDENT, ToolbarItem::HR,ToolbarItem::IMAGE
        ]),
```

Adding Dividers between Toolbar Actions
---------------------------------------

[](#adding-dividers-between-toolbar-actions)

To add a divider between toolbar actions, you can use the ToolbarItem::DIVIDER constant.

```
   use Malzariey\FilamentLexicalEditor\LexicalEditor;

    LexicalEditor::make('content')
        ->enabledToolbars([
            ToolbarItem::UNDO, ToolbarItem::REDO,
            ToolbarItem::DIVIDER,
            ToolbarItem::FONT_FAMILY,
            ToolbarItem::DIVIDER,
            ToolbarItem::NORMAL,
        ]),
```

Styling
=======

[](#styling)

If you're [building a custom Filament theme](https://filamentphp.com/docs/2.x/admin/appearance#building-themes), you need one more step to make the editor theme match your custom theme.

Add this line to your `resources/css/{panel_name}/theme.css` file.

```
@import '/vendor/malzariey/filament-lexical-editor/resources/css/index.css';
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Majid Al Zariey](https://github.com/malzariey)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Acknowledgements
----------------

[](#acknowledgements)

- This project makes use of [Lexical Editor](https://github.com/facebook/lexical) by [Meta](https://github.com/facebook).
- Special thanks to [JetBrains](https://www.jetbrains.com), whose support to open-source projects has been tremendously valuable for our project's progress and improvement. Through their [Open Source Support Program](https://www.jetbrains.com/community/opensource/#support), JetBrains has generously provided us with free licenses to their high-quality professional developer tools, including IntelliJ IDEA and PhpStorm. These tools have greatly improved our productivity and made it easier to maintain high quality code. JetBrains has demonstrated a strong commitment to assisting the open source community, making a significant contribution to promoting open-source software and collaboration. We wholeheartedly thank JetBrains for their support and for having us in their open-source project support program.

[![JetBrains Logo](https://camo.githubusercontent.com/625ab2dbcfc9995999363bfa22c2e2341d09a78c4dd1c772b8fdfc5e62dbdf23/68747470733a2f2f7777772e6a6574627261696e732e636f6d2f636f6d70616e792f6272616e642f696d672f6a6574627261696e735f6c6f676f2e706e67)](https://www.jetbrains.com/)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance78

Regular maintenance activity

Popularity37

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Recently: every ~95 days

Total

8

Last Release

116d ago

Major Versions

0.3 → 1.12025-04-30

1.1 → 2.0.0-beta2025-07-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/94e7a69eedc06b2f4531e69ca24c2d6752fa8b1cd0a29ddd465a91dec5d7eeaa?d=identicon)[malzariey](/maintainers/malzariey)

---

Top Contributors

[![malzariey](https://avatars.githubusercontent.com/u/35528749?v=4)](https://github.com/malzariey "malzariey (38 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![mattyforth](https://avatars.githubusercontent.com/u/31514505?v=4)](https://github.com/mattyforth "mattyforth (1 commits)")

---

Tags

laraveleditortext-editorMalzarieyrich textlexicalfilaemntPHPfilament-lexical-editor

### Embed Badge

![Health badge](/badges/malzariey-filament-lexical-editor/health.svg)

```
[![Health](https://phpackages.com/badges/malzariey-filament-lexical-editor/health.svg)](https://phpackages.com/packages/malzariey-filament-lexical-editor)
```

###  Alternatives

[emilianotisato/nova-tinymce

This Nova package allow you to use TinyMCE editor for text areas.You can customize the editor options and... you can upload images to your server and put them rigth there on the text without leaving the text editor!

116884.3k4](/packages/emilianotisato-nova-tinymce)[mati365/ckeditor5-livewire

CKEditor 5 integration for Laravel Livewire

413.9k](/packages/mati365-ckeditor5-livewire)[ktquez/laravel-tinymce

TinyMCE editor for Laravel and Lumen Framework

2525.4k](/packages/ktquez-laravel-tinymce)[filafly/brisk

A simple, friendly theme for Filament.

2211.9k1](/packages/filafly-brisk)[techguy/laravel-ckeditor

JavaScript WYSIWYG web text editor (for laravel).

1113.5k](/packages/techguy-laravel-ckeditor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
