Skip to content

Commit 5a70a28

Browse files
committed
Update README.md
1 parent 6b2e3f2 commit 5a70a28

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

README.md

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
# Code editor extension for laravel-admin
22

3-
4-
这是一个`laravel-admin`扩展,用来将 [CodeMirror](https://github.com/codemirror/CodeMirror) 集成进`laravel-admin`的表单中。
5-
6-
## 预览
7-
8-
http://demo.laravel-admin.org/editors/code-mirror 登录账号/密码:admin/admin。
9-
10-
## 截图
11-
12-
![CodeMirror](https://user-images.githubusercontent.com/2421068/45276361-5a038480-b4f4-11e8-8b49-932f001f073b.png)
3+
这是一个`laravel-admin`扩展,用来将 [CodeMirror](https://github.com/codemirror/CodeMirror) 集成进`laravel-admin`中。
134

145
## 安装
156

@@ -23,34 +14,6 @@ composer require jxlwqq/code-mirror
2314
php artisan vendor:publish --tag=laravel-admin-code-mirror
2415
```
2516

26-
## 配置
27-
28-
`config/admin.php`文件的`extensions`,加上属于这个扩展的一些配置
29-
```php
30-
'extensions' => [
31-
'code-mirror' => [
32-
// 如果要关掉这个扩展,设置为false
33-
'enable' => true,
34-
// 编辑器的配置
35-
'config' => [
36-
'lineNumbers' => true,
37-
'indentUnit' => 4,
38-
'styleActiveLine' => true,
39-
'matchBrackets' => true,
40-
'lineWrapping' => true,
41-
'theme' => 'darcula',
42-
]
43-
]
44-
]
45-
```
46-
47-
## 使用
48-
49-
在form表单中使用它:
50-
```php
51-
$form->code('content');
52-
```
53-
5417
License
5518
------------
5619
Licensed under [The MIT License (MIT)](LICENSE).

0 commit comments

Comments
 (0)