kaikaige/yii2-tinymce

tinymce

Installs: 9

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.0 2020-10-10 09:47 UTC

This package is auto-updated.

Last update: 2024-04-16 15:57:17 UTC


README

tinymce

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist kaikaige/yii2-tinymce "*"

or add

"kaikaige/yii2-tinymce": "*"

to the require section of your composer.json file.

Usage

基础用法

<?= $form->field($model, 'attribute')->widget(\kaikaige\tinymce\TinyMce::class);?>

高级用法

<?= $form->field($model, 'name')->widget(\kaikaige\tinymce\TinyMce::class, [
        'height'=>600, //高度,单位px
        'uploadUrl' => ['site/upload'], //图片上传地址
        'baseUrl' => "/", //
        'toolbar' => "",
        'clientOptions'=>[],
    ]); ?>

options

  • height number 高度,单位px
  • uploadUrl string 图片上传地址