File tree Expand file tree Collapse file tree 1 file changed +1
-38
lines changed Expand file tree Collapse file tree 1 file changed +1
-38
lines changed Original file line number Diff line number Diff line change 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
2314php 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-
5417License
5518------------
5619Licensed under [ The MIT License (MIT)] ( LICENSE ) .
You can’t perform that action at this time.
0 commit comments