2017 © Pedro Peláez
 

yii2-extension yii2-tinymce

TinyMCE extension for Yii2 with compressor

image

codezeen/yii2-tinymce

TinyMCE extension for Yii2 with compressor

  • Sunday, May 10, 2015
  • by 13nightevil
  • Repository
  • 2 Watchers
  • 1 Stars
  • 3,880 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 11 % Grown

The README.md

Yii2 TinyMCE

TinyMCE Extension For Yii2 With Compressor, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist codezeen/yii2-tinymce "*"

or add, (*4)

"codezeen/yii2-tinymce": "*"

to the require section of your composer.json file., (*5)

Usage

Register Asset Only

If you only want to use the asset, you only need to write the following code to the file view:, (*6)

<?= \codezeen\yii2\tinymce\TinyMceAsset::register($this); ?>

Usage With ActiveForm

<?= $form->field($model, 'attribute')->widget(
    TinyMce::className(),
    [
        'settings'        => [
            'language'               => 'en',
            'plugins'                => [
                "advlist autolink lists link image charmap print preview hr anchor pagebreak",
                "searchreplace visualblocks visualchars code fullscreen",
                "insertdatetime media nonbreaking save table contextmenu directionality",
                "template paste textcolor"
            ],
            'toolbar'                => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media | forecolor backcolor",
            'toolbar_items_size'     => 'small',
            'image_advtab'           => true,
            'relative_urls'          => false,
        ],
    ]
) ?>

Usage Without ActiveForm

<?= TinyMce::widget([
    // ...
]) ?>

Usage With Compressor

Add the following code to the controller, (*7)

public function actions()
{
    return [
        'tinyMceCompressor' => [
            'class' => TinyMceCompressorAction::className(),
        ],
    ];
}

Then, add route to configured action to widget options:, (*8)

$form->field($model, 'content')->widget(
    TinyMce::className(),
    ['compressorRoute' => 'controller/tiny-mce-compressor']
)

More Information About TinyMCE

Please, check the TinyMCE plugin site documentation for more options., (*9)

The Versions

10/05 2015

dev-master

9999999-dev

TinyMCE extension for Yii2 with compressor

  Sources   Download

BSD-3-Clause

The Requires

 

by Agiel K. Saputra

extension yii2 tinymce editor js

10/05 2015

1.0.0

1.0.0.0

TinyMCE extension for Yii2 with compressor

  Sources   Download

BSD-3-Clause

The Requires

 

by Agiel K. Saputra

extension yii2 tinymce editor js