nyx-solutions/yii2-nyx-tinymce

Yii2 TinyMCE Widget

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Language:JavaScript

5.0.0 2022-06-03 03:09 UTC

This package is auto-updated.

Last update: 2024-11-30 01:54:05 UTC


README

Renders a TinyMCE WYSIWYG text editor plugin widget. Inspired by PendalF89/yii2-tinymce extension.

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

Installation

The preferred way to install this extension is through composer.

  • Either run
php composer.phar require --prefer-dist "nyx-solutions/yii2-nyx-tinymce" "*"

or add

"nyx-solutions/yii2-nyx-tinymce": "*"

to the require section of your application's composer.json file.

Usage

In the view files you can use:

<?= $form->field($model, 'text')->widget(
        \nyx\widgets\tinymce\TinyMce::className(), [
            'clientOptions' => [
                'language' => 'pt_BR',
                '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"
            ]
        ]
    );

?>

License

yii2-nyx-tinymce is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

Yii2