PHP code example of aiddroid / yii2-tinymce

1. Go to this page and download the library: Download aiddroid/yii2-tinymce 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/ */

    

aiddroid / yii2-tinymce example snippets


    echo $form->field($model, 'body')->widget(
        \aiddroid\yii2tinymce\Widget::className(),
        [
            'options' => [
                'language' => 'zh_CN',
                'selector' => 'textarea',
                'height' => 500,
                'menubar' => false,
                'plugins' => [
                    "advlist autolink lists link image charmap print preview anchor",
                    "searchreplace visualblocks code fullscreen",
                    "insertdatetime media table contextmenu paste imagetools elfinder"
                ],
                'toolbar' => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image preview",
            ]
        ]
    )