PHPackages                             eg-mohamed/filament-rich-editor-source-code - 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. eg-mohamed/filament-rich-editor-source-code

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

eg-mohamed/filament-rich-editor-source-code
===========================================

Allow Filament 4.x or 5.x View and edit the source code of the rich text editor in the form of a modal.

1.0.0(3w ago)06MITJavaScriptPHP ^8.2

Since May 14Pushed 3w agoCompare

[ Source](https://github.com/EG-Mohamed/filament-rich-editor-source-code)[ Packagist](https://packagist.org/packages/eg-mohamed/filament-rich-editor-source-code)[ Docs](https://github.com/curder/filament-rich-editor-source-code)[ GitHub Sponsors](https://github.com/curder)[ RSS](/packages/eg-mohamed-filament-rich-editor-source-code/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (13)Versions (2)Used By (0)

Filament rich editor source code
================================

[](#filament-rich-editor-source-code)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6c227f32ebcd294c4f51b661c5d338325aacf2f1a86a4ceb1ee329c4f29837aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6375726465722f66696c616d656e742d726963682d656469746f722d736f757263652d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/curder/filament-rich-editor-source-code)[![GitHub Tests Action Status](https://camo.githubusercontent.com/26b142cf7702d02ea4a3748ab7c12311f2ba769a46564361b78d1c60b4891c23/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6375726465722f66696c616d656e742d726963682d656469746f722d736f757263652d636f64652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/curder/filament-rich-editor-source-code/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/cdd19f70a8dc34ab677b4106b96e1c1d219c231065314419d1bca8def72981f9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6375726465722f66696c616d656e742d726963682d656469746f722d736f757263652d636f64652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/curder/filament-rich-editor-source-code/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/eec0c04d3e2397e0fafab56cb24f9791dd04f690fa43b7e35d0c1e4cf9413f5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6375726465722f66696c616d656e742d726963682d656469746f722d736f757263652d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/curder/filament-rich-editor-source-code)

Allow Filament 4.x Or 5.x View and edit the source code of the rich text editor in the form field.

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

[](#installation)

You can install the package via composer:

```
composer require curder/filament-rich-editor-source-code
```

You need to publish the package assets using the following command:

```
php artisan filament:assets
```

You can publish the language files using the following command:

```
php artisan vendor:publish --tag=filament-rich-editor-source-code-translations
```

Usage
-----

[](#usage)

To enable the source code button in the Filament Rich Editor, you need to customize the toolbar buttons by adding the `source-code` button to the array of toolbar buttons.

```
RichEditor::make('html')
    ->toolbarButtons([
        ['source-code'], // Add the `source-code` button to the toolbar.
        [ 'bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', 'link'],
        ['h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd'],
        ['blockquote', 'codeBlock', 'bulletList', 'orderedList'],
        ['table', 'attachFiles', 'customBlocks'], // The `customBlocks` and `mergeTags` tools are also added here if those features are used.
        ['undo', 'redo'],
    ]),
```

Testing
-------

[](#testing)

```
composer test
```

Development
-----------

[](#development)

You can set up the development environment by running the following commands:

Add the following script to your `composer.json` to require the development dependencies:

```
{
    "require": {
        "php": "^8.2",
        "curder/filament-rich-editor-source-code": "@dev",
        "filament/filament": "^5.0",
        "laravel/framework": "^12.0",
        "laravel/tinker": "^2.10.1"
    },
    "repositories": [
        {"type": "path", "url": "/Users/curder/Codes/GitHub/curder/filament-rich-editor-source-code"}
    ]
}
```

Then run:

```
composer update curder/filament-rich-editor-source-code
```

If you change js file, should run the following commands to install dependencies and build assets:

```
# Install the dependencies
pnpm i

# Build the assets initially
node ./bin/build.js
```

And run the following command to your project directory update the assets after changing js files:

```
php artisan filament:assets
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

PRs are welcome.

- Keep changes focused.
- Include tests if behavior changes.

Security
--------

[](#security)

If you discover a security issue, please report it privately by emailing the maintainer.

Credits
-------

[](#credits)

- [curder](https://github.com/Curder)

License
-------

[](#license)

MIT. See [LICENSE](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance94

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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

Unknown

Total

1

Last Release

26d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23424932?v=4)[Mohamed Said](/maintainers/EG-Mohamed)[@EG-Mohamed](https://github.com/EG-Mohamed)

---

Top Contributors

[![curder](https://avatars.githubusercontent.com/u/8327004?v=4)](https://github.com/curder "curder (26 commits)")[![EG-Mohamed](https://avatars.githubusercontent.com/u/23424932?v=4)](https://github.com/EG-Mohamed "EG-Mohamed (2 commits)")

---

Tags

laravelcurderfilament-rich-editor-source-code

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/eg-mohamed-filament-rich-editor-source-code/health.svg)

```
[![Health](https://phpackages.com/badges/eg-mohamed-filament-rich-editor-source-code/health.svg)](https://phpackages.com/packages/eg-mohamed-filament-rich-editor-source-code)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M41](/packages/spatie-laravel-pdf)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17758.9k2](/packages/stephenjude-filament-jetstream)[stephenjude/filament-debugger

About

103150.5k2](/packages/stephenjude-filament-debugger)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

207140.2k1](/packages/guava-filament-knowledge-base)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2210.5k](/packages/mradder-filament-logger)

PHPackages © 2026

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