定制 wise5lin/yii2-tinymce5 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

basic preset

Full preset does not include premium plugins

full preset

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-11-12