pravda1979/yii2-tinymce

TinyMCE WYSIWYG HTML Editor for Yii2.

Installs: 205

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.1.0 2019-03-22 00:57 UTC

This package is auto-updated.

Last update: 2024-04-22 13:11:47 UTC


README

Extension for Yii2 based on TinyMCE 5.

Installation

Preferred installation method for this extension is through composer.

To install TinyMCE extension run:

composer require pravda1979/yii2-tinymce "~1.0.0"

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

"pravda1979/yii2-tinymce": "~1.0.0"

Demo

You can see demo example

Usage

Use with model

use pravda1979\tinymce\TinyMce;

<?= $form->field($model, 'html')->widget(TinyMce::className(), [
    'options' => ['rows' => 10],
    'language' => 'ru',
    'clientOptions' => [
        // Setting by default
        'plugins' => 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern help',
        'toolbar' => 'formatselect | bold italic strikethrough forecolor backcolor formatpainter | link image media | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent | removeformat | addcomment',
    ]
]);?>

or without model

use pravda1979\tinymce\TinyMce;

<?= \pravda1979\tinymce\TinyMCE::widget([
    'name' => 'test-tinymce',
    'value' => 'test TinyMCE',
    'language' => 'ru',
    'clientOptions' => [
        // Setting by default
        'plugins' => 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern help',
        'toolbar' => 'formatselect | bold italic strikethrough forecolor backcolor formatpainter | link image media | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent | removeformat | addcomment',
    ]
]); ?>