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(9mo ago)2392.0k↓33.4%8[5 issues](https://github.com/dotswan/filament-code-editor/issues)1MITPHPPHP ^8.1

Since Dec 7Pushed 9mo 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 2d 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjE3MzEsIm5iZiI6MTc4MjkyMTQzMSwicGF0aCI6Ii8yMDg3NDU2NS8zMTM3Mzk2ODItZjgxNGVjNWYtNWQ3My00MzMxLWE2NjktMjVkNTBjZmRjNDQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE1NTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZmZTZjODJmYmFkZWQwNWI2YTkwYzU2OTkyZjg4ZWQ5NGJmOTA5MDY2OWI0NTgyMmQ0OTc3NzlkNTU4Zjg5ZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.hfOFqVKl2DgqZvL06meQirPywMf5PQU13hsq5qBdUNQ)](https://private-user-images.githubusercontent.com/20874565/313739682-f814ec5f-5d73-4331-a669-25d50cfdc444.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjE3MzEsIm5iZiI6MTc4MjkyMTQzMSwicGF0aCI6Ii8yMDg3NDU2NS8zMTM3Mzk2OD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TlmMmMzZTVlOTJkNDA5OWI0M2UwMzFjODVhYzBlNGE5NTU3NmU1ODNjNzdiYzI4YmMyYjQ4OGJhNmYzNzg5NzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.7rqFkuF7ujoO-uxXH_JOqfZpajeRLKqLkqsIzGVNqYU)](https://private-user-images.githubusercontent.com/20874565/313740055-df6608c9-2088-4d78-8a94-a814ba873c6b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MjE3MzEsIm5iZiI6MTc4MjkyMTQzMSwicGF0aCI6Ii8yMDg3NDU2NS8zMTM3NDAwNTUtZGY2NjA4YzktMjA4OC00ZDc4LThhOTQtYTgxNGJhODczYzZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDE1NTcxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlmMmMzZTVlOTJkNDA5OWI0M2UwMzFjODVhYzBlNGE5NTU3NmU1ODNjNzdiYzI4YmMyYjQ4OGJhNmYzNzg5NzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.7rqFkuF7ujoO-uxXH_JOqfZpajeRLKqLkqsIzGVNqYU)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

46

—

FairBetter than 92% of packages

Maintenance52

Moderate activity, may be stable

Popularity43

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

292d 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

[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M24](/packages/ysfkaya-filament-phone-input)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

128192.3k3](/packages/dotswan-filament-map-picker)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)

PHPackages © 2026

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