PHP code example of tecsin / yii2-tinymce
1. Go to this page and download the library: Download tecsin/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/ */
tecsin / yii2-tinymce example snippets
/**
* @var array clientOptions The client options for TinyMCE JS plugin.
* @see http://www.tinymce.com/wiki.php/Configuration
*/
<?= $form->field($model, 'content')->widget(\tecsin\tinymce\Tinymce::className(), [
'options' => ['rows' => 6],
'language' => 'en_GB',
'clientOptions' => [
'plugins' => [
"image imagetools lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"save table contextmenu directionality emoticons template paste textcolor"
],
'toolbar' => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons "
],
/*elfinder options*/
'file' => '/admin/file-browser',//relative or absolute url
'title' => 'file browser',
'width' => 750,
'height' => 350,
'resizable' => 'yes'
]);
/**
* @var array clientOptions The client options for TinyMCE JS plugin.
* @see http://www.tinymce.com/wiki.php/Configuration
*/
<?= \tecsin\tinymce\Tinymce::widget([
'options' => ['rows' => 6],
'language' => 'en_GB',
'clientOptions' => [
'plugins' => [
"image imagetools lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"save table contextmenu directionality emoticons template paste textcolor"
],
'toolbar' => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons "
]
]);
php composer.phar