PHP code example of jxlwqq / wang-editor2

1. Go to this page and download the library: Download jxlwqq/wang-editor2 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/ */

    

jxlwqq / wang-editor2 example snippets



'extensions' => [
    'wang-editor2' => [
        // 如果要关掉这个扩展,设置为false
        'enable' => true,
        // 编辑器的配置
        'config' => [
            'uploadImgFileName' => 'upload',
            'uploadImgUrl' => '/admin/upload',
            'menus' => [
                'source',
                '|',
                'bold',
                'underline',
                'italic',
                'strikethrough',
                'eraser',
                'forecolor',
                'bgcolor',
                '|',
                'quote',
                'fontfamily',
                'fontsize',
                'head',
                'unorderlist',
                'orderlist',
                'alignleft',
                'aligncenter',
                'alignright',
                '|',
                'link',
                'unlink',
                'table',
                '|',
                'img',
                'video',
                'insertcode',
                '|',
                'undo',
                'redo',
                'fullscreen'
            ],
        ]
    ]
]


$form->editor('content');
bash
php artisan vendor:publish --tag=laravel-admin-wang-editor2