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

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

藏色散人
Release: 2021-06-03 09:04:14
forward
3132 people have browsed it

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
Copy after login

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’
           ]
       ]
   ],
Copy after login

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

$form->editor(‘tpl’);
Copy after login

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!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template