https://github.com/laravel-admin-extensions/js-editor
Javascript editor extension for laravel-admin based on code-mirror
https://github.com/laravel-admin-extensions/js-editor
Last synced: 3 months ago
JSON representation
Javascript editor extension for laravel-admin based on code-mirror
- Host: GitHub
- URL: https://github.com/laravel-admin-extensions/js-editor
- Owner: laravel-admin-extensions
- License: mit
- Created: 2018-09-11T16:07:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-23T16:12:32.000Z (almost 7 years ago)
- Last Synced: 2025-04-16T20:57:10.544Z (3 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-laravel-admin - js-editor - JavaScript 语言编辑器 (扩展包 / 字段类扩展包)
README
Javascript editor extension for laravel-admin based on code-mirror
======[DEMO](http://demo.laravel-admin.org/code-mirror/js) (Login using `admin/admin`)
## Installation
```bash
composer require laravel-admin-ext/js-editorphp artisan vendor:publish --tag=laravel-admin-code-mirror
```## Configuration
In the `extensions` section of the `config/admin.php` file, add some configuration that belongs to this extension.
```php'extensions' => [
'js-editor' => [
// Set to false if you want to disable this extension
'enable' => true,
// Editor configuration
'config' => [
]
]
]```
The configuration of the editor can be found in [CodeMirror Docmentation](https://codemirror.net/)
## 使用
在form表单中使用它:
```php
$form->js('code');// alias of `js` method
$form->javascript('code');$form->json('code');
$form->jsond('code');
$form->typescript('code');
```Set height
```php
$form->js('code')->height(500);
```## Donate
> Help keeping the project development going, by donating a little. Thanks in advance.
[](https://www.paypal.me/zousong)

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