PHP code example of puzzle9 / dact-admin-wang-editor

1. Go to this page and download the library: Download puzzle9/dact-admin-wang-editor 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/ */

    

puzzle9 / dact-admin-wang-editor example snippets


    'extensions' => [
        'dact-admin-wang-editor' => [
            'enable' => true,
            // 储存 disk
            'disk' => 'public',
            // http://www.wangeditor.com/doc/pages/03-配置菜单/
            'config' => [
                // 设置默认 zIndex
                'zIndex' => 1,
                // 粘贴样式的过滤
                'pasteFilterStyle' => true,
                // 粘贴内容中的图片
                'pasteIgnoreImg' => true,
                // 上传图片大小
                'uploadImgMaxSize' => 5 * 1024 * 1024, // 2M
                // 一次最多能传几张图片
                'uploadImgMaxLength' => 5,
                // 插入网络图片的功能
                'showLinkImg' => false,
                // 菜单
                'menus' => [
                    'head',
                    'bold',
                    'customFontSize',
                    'fontName',
                    'italic',
                    'underline',
                    'strikeThrough',
                    'indent',
                    'lineHeight',
                    'foreColor',
                    'backColor',
                    // 'link',
                    'list',
                    'justify',
                    // 'quote',
                    // 'emoticon',
                    'image',
                    // 'video',
                    // 'table',
                    // 'code',
                    'splitLine',
                    'undo',
                    'redo',
                ],
            ],
        ],
    ],

$form->editor('content')->height(500)->

$form->editor('content')->height(500);

$form->editor('content')->zIndex(1);