PHP code example of zhuzhichao / ueditor

1. Go to this page and download the library: Download zhuzhichao/ueditor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zhuzhichao / ueditor example snippets


'Zhuzhichao\Ueditor\UeditorServiceProvider',

'Ueditor'        => 'Zhuzhichao\Ueditor\Ueditor',

// 添加css样式
{{ Ueditor::css() }}

// 添加编辑器样式
// 该方法有两个参数,
// 第一个为显示的编辑器内容【可选】
// 第二个为编辑器的attribute数组,可以控制编辑器的id,style,class等内容【可选】,默认id为myEditor
// example: Ueditor::content('', ['id'=>'textid', 'class'=>'text-ueditor'])
{{ Ueditor::content() }}
// 得到 <script type='text/plain'  id='textid' class='text-ueditor'></script>

// 添加js
{{ Ueditor::js() }}
shell
php artisan config:publish zhuzhichao/ueditor
php artisan asset:publish zhuzhichao/ueditor