PHP code example of jxlwqq / simditor

1. Go to this page and download the library: Download jxlwqq/simditor 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 / simditor example snippets



'extensions' => [
    'simditor' => [
        // Set to false if you want to disable this extension
        'enable' => true,
        // Editor configuration
        'config' => [
            'upload' => [
                'url' => '/admin/api/upload', # example api route: admin/api/upload
                'fileKey' => 'upload_file',
                'connectionCount' => 3,
                'leaveConfirm' => 'Uploading is in progress, are you sure to leave this page?'
            ],
            'tabIndent' => true,
            'toolbar' => ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'],
            'toolbarFloat' => true,
            'toolbarFloatOffset' => 0,
            'toolbarHidden' => false,
            'pasteImage' => true,
            'cleanPaste' => false,
        ]
    ]
]

$form->simditor('content');