wise5lin/yii2-tinymce5
最新稳定版本:1.0.0
Composer 安装命令:
composer require wise5lin/yii2-tinymce5
包简介
TinyMCE 5 widget for Yii 2
README 文档
README
Installation
The preferred way to install this extension is through the composer.
Just run the command:
php composer.phar require --prefer-dist wise5lin/yii2-tinymce5 "~1.0.0"
or add
"wise5lin/yii2-tinymce5": "~1.0.0"
into the require section of your composer.json file.
Using
Once the extension is installed, just use it in your code:
use wise5lin\tinymce5\TinyMCE;
<?= $form->field($model, 'content')->widget(TinyMCE::class) ?>
Settings
preset - selection of predefined settings for the editor panel. It can take values basic, full and custom.
<?= $form->field($model, 'content')->widget(TinyMCE::class, [
'preset' => 'full', // basic (default), custom
]) ?>
Basic preset

Full preset does not include premium plugins

editorOptions - js editor options, see all possible options on the official website.
<?= $form->field($model, 'content')->widget(TinyMCE::class, [
'preset' => 'full',
// https://www.tiny.cloud/docs/configure
'editorOptions' => [
'height' => 300,
]
]) ?>
editorInlineContainerTag - the HTML tag for the container of the editor in inline mode.
Used only if the editor is in inline mode!
<?= $form->field($model, 'content')->widget(TinyMCE::class, [
'preset' => 'full',
'editorOptions' => [
'height' => 300,
'inline' => true,
],
'editorInlineContainerTag' => 'div' // Default
]) ?>
editorInlineContainerOptions - the HTML attributes for the container of the editor in inline mode.
Used only if the editor is in inline mode!
<?= $form->field($model, 'content')->widget(TinyMCE::class, [
'preset' => 'full',
'editorOptions' => [
'height' => 300,
'inline' => true,
],
'editorInlineContainerTag' => 'div',
'editorInlineContainerOptions' => [
'class' => 'my-class'
],
]) ?>
统计信息
- 总下载量: 3.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-11-12