1. Go to this page and download the library: Download elitedivision/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/ */
elitedivision / yii2-tinymce example snippets
use pendalf89\tinymce\TinyMce;
<?= $form->field($model, 'text')->widget(TinyMce::className(), [
'clientOptions' => [
'language' => 'ru',
'plugins' => [
"advlist autolink lists link charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste"
],
'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
],
'triggerSaveOnBeforeValidateForm' => true, // Переключатель необходимости сохранения окна редактирования в поле textarea перед валидацией формы
]);
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.