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(5mo ago)1521.4k↓53.4%6[1 PRs](https://github.com/malzariey/filament-lexical-editor/pulls)MITCSSPHP ^8.1CI passing

Since Jan 5Pushed 1w 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 2d ago

READMEChangelog (9)Dependencies (1)Versions (14)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

52

—

FairBetter than 96% of packages

Maintenance86

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78% 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 ~62 days

Recently: every ~96 days

Total

9

Last Release

46d ago

Major Versions

0.3 → 1.12025-04-30

1.1 → 2.0.0-beta2025-07-09

2.1.0 → 5.0.0-beta.12026-05-19

PHP version history (2 changes)0.1PHP ^8.1

5.0.0-beta.1PHP ^8.2

### 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 (39 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 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

[statikbe/laravel-filament-flexible-content-blocks

The Laravel Filament Flexible Content Blocks package helps you to easily create content in Filament for any model, with predefined or custom blocks, and foreach block an extendable Blade view component.

17625.6k4](/packages/statikbe-laravel-filament-flexible-content-blocks)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[mati365/ckeditor5-livewire

CKEditor 5 integration for Laravel Livewire

447.9k](/packages/mati365-ckeditor5-livewire)

PHPackages © 2026

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