UEditor extension for laravel-admin
Clone or download
Latest commit e8cf5e0 Oct 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources/views first commit Oct 28, 2018
src first commit Oct 28, 2018
.gitignore first commit Oct 28, 2018
LICENSE first commit Oct 28, 2018
README.md Update README.md Oct 28, 2018
composer.json update name Oct 28, 2018

README.md

UEditor extension for laravel-admin

这是一个 laravel-admin 扩展,用来将 UEditor 集成进 laravel-admin 的表单中,依赖 overtrue/laravel-ueditor

安装

composer require codingyu/ueditor

发布 overtrue/laravel-ueditor 的资源

php artisan vendor:publish --provider='Overtrue\LaravelUEditor\UEditorServiceProvider'

配置

config/admin.php文件的extensions,加上属于这个扩展的一些配置


    'extensions' => [

        'ueditor' => [

            // 如果要关掉这个扩展,设置为false
            'enable' => true,

            // 编辑器的前端配置 参考:http://fex.baidu.com/ueditor/#start-config
            'config' => [
                'initialFrameHeight' => 400, // 例如初始化高度
            ]
        ]
    ]

后端配置 config/ueditor.php,参考 overtrue/laravel-ueditor

使用

在form表单中使用它:

$form->editor('content');

// options 中参数会覆盖 extensions.ueditor.config 中参数
$form->editor('content')->options(['initialFrameHeight' => 800]);

大感谢

License

Licensed under The MIT License (MIT).