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 ¶
web development has never been so fun
www.2amigos.us
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.
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?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.