PHPackages                             laravel-admin-ext/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. laravel-admin-ext/code-editor

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

laravel-admin-ext/code-editor
=============================

Code editor extension for laravel-admin based on code-mirror

v1.0.0(5y ago)61742MITPHPPHP &gt;=7.0.0

Since Sep 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/laravel-admin-extensions/code-editor)[ Packagist](https://packagist.org/packages/laravel-admin-ext/code-editor)[ Docs](https://github.com/laravel-admin-ext/code-editor)[ RSS](/packages/laravel-admin-ext-code-editor/feed)WikiDiscussions master Synced 1mo ago

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

Code editor extension for laravel-admin 2.x based on CodeMirror

Supports `php`、`sql`、`javascript`、`java`、`c`、`cpp`、`csharp`、`objc`、`scala`、`kotlin`、`ceylon`、`python`、`ruby`、`css`、`sass`、`less`、`xml`、`html`、`nginx`、`vuejs`、`lua`、`yaml`、`swift`、`clojure`、`coffeescript`、`protobuf`、`commonlisp`、`dart`、`dockerfile`、`diff`、`rust`、`shell`、`go`、`haml`

基于CodeMirror的代码编辑器，可用于laravel-admin 2.x

支持`php`、`sql`、`javascript`、`java`、`c`、`cpp`、`csharp`、`objc`、`scala`、 `kotlin`、`ceylon`、`python`、`ruby`、`css`、`sass`、`less`、`xml`、`html`、`nginx`、 `vuejs`、`lua`、`yaml`、`swift`、`clojure`、`coffeescript`、`protobuf`、`commonlisp`、 `dart`、`dockerfile`、`diff`、`rust`、`shell`、`go`、`haml`等语言。

[![QQ20200925-120900](https://user-images.githubusercontent.com/1479100/94225656-33241980-ff28-11ea-869a-6afd75d683e6.png)](https://user-images.githubusercontent.com/1479100/94225656-33241980-ff28-11ea-869a-6afd75d683e6.png)

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

[](#installation)

```
composer require laravel-admin-ext/code-editor -vvv
```

Usage
-----

[](#usage)

Use it in the form:

```
$form->code('code_column')->php();

$form->code('code_column')->dockerfile();

$form->code('code_column')->html();
```

Set height:

```
$form->php('code')->height(500);
```

Use in show page:

```
// show as PHP code and 300 height.
$show->field('code_column')->code('php', 300);
```

Donate
------

[](#donate)

> Help keeping the project development going, by donating a little. Thanks in advance.

[![PayPal Me](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.me/zousong)

> 如果你觉得这个项目帮助你节约了时间，不妨支持一下，已激励我创造出更多有用的项目

[![-1](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)

License
-------

[](#license)

Licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

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

2053d ago

### Community

Maintainers

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

---

Top Contributors

[![z-song](https://avatars.githubusercontent.com/u/1479100?v=4)](https://github.com/z-song "z-song (5 commits)")

---

Tags

codeextensioneditorcode mirrorlaravel-admin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-admin-ext-code-editor/health.svg)

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

###  Alternatives

[laravel-admin-ext/summernote

Summernote extension for laravel-admin

37140.5k](/packages/laravel-admin-ext-summernote)[laravel-admin-ext/ckeditor

Integrate CKEDITOR into laravel-admin

30183.6k1](/packages/laravel-admin-ext-ckeditor)[laravel-admin-ext/china-distpicker

Distpicker extension for laravel-admin

13443.9k](/packages/laravel-admin-ext-china-distpicker)[jxlwqq/quill

quill editor for laravel-admin

2427.1k](/packages/jxlwqq-quill)[laravel-admin-ext/sparkline

Integrates jQuery sparkline into laravel-admin

161.1k](/packages/laravel-admin-ext-sparkline)

PHPackages © 2026

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