PHPackages                             dotswan/filament-code-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dotswan/filament-code-editor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dotswan/filament-code-editor
============================

v2.0.0(11mo ago)2395.6k↓33.6%8[5 issues](https://github.com/dotswan/filament-code-editor/issues)1MITPHPPHP ^8.1

Since Dec 7Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/dotswan/filament-code-editor)[ Packagist](https://packagist.org/packages/dotswan/filament-code-editor)[ Docs](https://github.com/dotswan/filament-code-editor)[ RSS](/packages/dotswan-filament-code-editor/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (7)Dependencies (5)Versions (11)Used By (1)

Filament Code Editor
====================

[](#filament-code-editor)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fa11ec1012f75f986ffac2a54032c0cb8b74de78184b47f8de762ffc8bf83095/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f747377616e2f66696c616d656e742d636f64652d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dotswan/filament-code-editor)[![Total Downloads](https://camo.githubusercontent.com/fa5c11b1f405090a57e0ee162e4ba38d4fefeecacccf13b25a933c5948fc6041/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f747377616e2f66696c616d656e742d636f64652d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dotswan/filament-code-editor)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/dotswan/filament-code-editor/blob/master/LICENSE.md)

[![](https://private-user-images.githubusercontent.com/20874565/313739682-f814ec5f-5d73-4331-a669-25d50cfdc444.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODYxNzQwMTMsIm5iZiI6MTc4NjE3MzcxMywicGF0aCI6Ii8yMDg3NDU2NS8zMTM3Mzk2ODItZjgxNGVjNWYtNWQ3My00MzMxLWE2NjktMjVkNTBjZmRjNDQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA4MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwODA4VDA3MjE1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwNmRlMGQ1MmZlMWEzMmNlMGFhMmI1ZGMzNzk3M2U5MDU4ZjlkYzVlNzdkMDUxNGNlNzljMjBjOGY2NTk0ZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.1H5dKti5Dyttl2ncpLdhgoBbWxNPSDU-vzRJwEgJufw)](https://private-user-images.githubusercontent.com/20874565/313739682-f814ec5f-5d73-4331-a669-25d50cfdc444.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODYxNzQwMTMsIm5iZiI6MTc4NjE3MzcxMywicGF0aCI6Ii8yMDg3NDU2NS8zMTM3Mzk2ODItZ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GU2NTI5YjkzOGQ1OGIxNWRmZmY1ZTllODQ1M2ZiZTMxYWIxZGE3MjhiODk5NTRjMmZjNDMwODIzMGYzYTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.WbZ_sn6uWbHacnZZAl_beEEh5qIsF7oToCutfS4z0Ss)](https://private-user-images.githubusercontent.com/20874565/313740055-df6608c9-2088-4d78-8a94-a814ba873c6b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODYxNzQwMTMsIm5iZiI6MTc4NjE3MzcxMywicGF0aCI6Ii8yMDg3NDU2NS8zMTM3NDAwNTUtZGY2NjA4YzktMjA4OC00ZDc4LThhOTQtYTgxNGJhODczYzZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA4MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwODA4VDA3MjE1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkOGU2NTI5YjkzOGQ1OGIxNWRmZmY1ZTllODQ1M2ZiZTMxYWIxZGE3MjhiODk5NTRjMmZjNDMwODIzMGYzYTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.WbZ_sn6uWbHacnZZAl_beEEh5qIsF7oToCutfS4z0Ss)Introduction
------------

[](#introduction)

The Filament Code Editor package enhances Filament with a specialized field type, allowing seamless code editing powered by the CodeMirror JavaScript library within Filament components. This integration provides users with a dedicated environment for editing various code languages such as CSS, HTML, JavaScript, JSON, and PHP directly within Filament forms.

- Key Features:
    - Integration of the CodeMirror JavaScript library into Filament components.
    - Support for multiple code languages including CSS, HTML, JavaScript, JSON, and PHP.
    - Effortless editing of code within the familiar Filament interface.

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

[](#installation)

To integrate the Filament Code Editor package into your project, use Composer:

```
composer require dotswan/filament-code-editor
```

For **Filament v3**:

```
composer require dotswan/filament-code-editor:"^1.1.4"
```

Basic Usage
-----------

[](#basic-usage)

To implement the code editor field within Filament forms, use the `CodeEditor` field type:

```
use Dotswan\FilamentCodeEditor\Fields\CodeEditor;

CodeEditor::make('codes')
    // Additional configuration goes here, if needed
    ->id('unique_field_id')
    ->minHeight(768)
    ->isReadOnly(true)
    ->showCopyButton(true)
    ->darkModeTheme('gruvbox-dark')
    ->lightModeTheme('basic-light')
    ->columnSpanFull(),
```

**Theme values:**

- basic-light
- basic-dark
- solarized-dark
- solarized-light
- material-dark
- nord
- gruvbox-light
- gruvbox-dark

Supported Languages
-------------------

[](#supported-languages)

The Filament Code Editor supports the following languages:

- CSS
- HTML
- JavaScript
- JSON
- PHP

Customize and manage code for these languages effortlessly within your Filament forms.

License
-------

[](#license)

This package is distributed under the [MIT License](link-to-your-license).

Security
--------

[](#security)

Security is a priority for us. If you encounter any security-related issues or vulnerabilities, please report them via our [GitHub issue tracker](https://github.com/dotswan/filament-code-editor/issues). For direct communication, reach out to .

Contribution
------------

[](#contribution)

Contributions are welcome and valued. Enhancements, suggestions, and bug reports help improve this package for everyone. Here's how you can contribute:

1. Fork the Project
2. Create a Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Thank you for considering contributing to the Filament Code Editor!

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance48

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76% 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 ~108 days

Recently: every ~134 days

Total

7

Last Release

338d ago

Major Versions

v1.1.4 → v2.0.02025-09-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3766252?v=4)[majida](/maintainers/majida)[@Majida](https://github.com/Majida)

![](https://avatars.githubusercontent.com/u/20874565?v=4)[Hessam Taghvaei](/maintainers/mohaphez)[@mohaphez](https://github.com/mohaphez)

---

Top Contributors

[![mohaphez](https://avatars.githubusercontent.com/u/20874565?v=4)](https://github.com/mohaphez "mohaphez (19 commits)")[![tharlesamaro](https://avatars.githubusercontent.com/u/17295629?v=4)](https://github.com/tharlesamaro "tharlesamaro (4 commits)")[![majidalavizadeh](https://avatars.githubusercontent.com/u/1640821?v=4)](https://github.com/majidalavizadeh "majidalavizadeh (2 commits)")

---

Tags

codemirrorcodemirror-editorfilamentfilament-code-editorfilament-code-editor-v3filamentphplaravelphplaraveldotswanfilament-code-editor

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/dotswan-filament-code-editor/health.svg)

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

###  Alternatives

[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

123204.9k1](/packages/stephenjude-filament-feature-flags)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94160.6k6](/packages/marcelweidum-filament-expiration-notice)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

85240.3k9](/packages/stephenjude-filament-two-factor-authentication)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6758.2k2](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

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