Home  >  Article  >  PHP Framework  >  How to use laravel-admin wang-editor rich text plug-in

How to use laravel-admin wang-editor rich text plug-in

藏色散人
藏色散人forward
2021-06-02 17:04:483068browse

The following tutorial column will introduce to you how to use the wang-editor rich text plug-in in laravel-admin. I hope it will be helpful to friends who need it!                                                                                                                

“laravel-admin-ext/wang-editor”: “1.*”
composer install

Publishphp artisan vendor:publish

Select [22]

How to use laravel-admin wang-editor rich text plug-in

Configuration

config/admin.php 文件添加:
‘extensions’ => [
       ‘wang-editor’ => [
           // 如果要关掉这个扩展,设置为false
           ‘enable’ => true,
           // 编辑器的配置
           ‘config’ => [
               // /upload接口用来上传文件,上传逻辑要自己实现,可参考下面的上传图片
//                ‘uploadImgServer’ => ‘/upload’
           ]
       ]
   ],

Modify bootstrap.php
Encore\Admin\Form::forget([‘map’, ‘editor’]);
改为
Encore\Admin\Form::forget([‘map’]);
Use

$form->editor(‘tpl’);

OK

Related Recommended:

The latest five Laravel video tutorials

The above is the detailed content of How to use laravel-admin wang-editor rich text plug-in. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete