laravel-admin-ext / clike-editor
Several c-lick language editor extensions for laravel-admin based on code-mirror
Installs: 7 708
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.0.0
- jxlwqq/code-mirror: *
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-11-17 17:38:01 UTC
README
DEMO (Login using admin/admin
)
Installation
composer require laravel-admin-ext/clike-editor php artisan vendor:publish --tag=laravel-admin-code-mirror
配置
在config/admin.php
文件的extensions
,加上属于这个扩展的一些配置
'extensions' => [ 'clike-editor' => [ // 如果要关掉这个扩展,设置为false 'enable' => true, // 编辑器的配置 'config' => [ ] ] ]
更多配置可以到CodeMirror文档找到
使用
在form表单中使用它:
$form->clang('code'); $form->cpp('code'); $form->csharp('code'); $form->java('code'); $form->objectivec('code'); $form->scala('code'); $form->kotlin('code'); $form->ceylon('code');
设置高度
$form->clang('code')->height(500);
支持
如果觉得这个项目帮你节约了时间,不妨支持一下;)
License
Licensed under The MIT License (MIT).