Yii 2.0: yii2-tinymce-widget

Renders a TinyMCE WYSIWYG text editor plugin widget
6 followers

Installation

The preferred way to install this extension is through composer.

Either run php composer.phar require "2amigos/yii2-tinymce-widget" "*" or add "2amigos/yii2-tinymce-widget" : "*"

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

Usage

The usage is pretty simple and doesn't differ much from other similar widgets:

use dosamigos\tinymce\TinyMce;
 
<?= $form->field($model, 'text')->widget(TinyMce::className(), [
    'options' => ['rows' => 6],
    'language' => 'es',
    'clientOptions' => [
        '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"
    ]
]);?>

Further Information

Please, check the TinyMCE plugin site documentation for further information about its configuration options

Resources

2amigOS!
web development has never been so fun
www.2amigos.us

Total 2 comments

#19637 report it
walco at 2015/10/24 01:13pm
file_browser_callback issue

Hi Antonio, Have you already tried to implement file_browser_callback? Cos i think it's possible once you make json encoding on php the result of json document is something like this "file_browser_callback":"namefunction" and may be the quotes could be a real issue. Have you encountered similar problems before? I have tried your widget and I can't implement file browser implementation, so i reckon the problem could be what i've just told u. Any solutions?

#19343 report it
Scott Deagan at 2015/05/27 09:35am
How to set detail font size?

How do you set the default font size? The default font size is very small, I would like to make it larger.

Leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet