lubobill1990/yii2-simditor

为 yii2 框架的编辑器

安装次数: 62

依赖者: 0

建议者: 0

安全: 0

星星: 0

关注者: 2

分支: 1

语言:JavaScript

类型:yii2-extension

v0.0.6 2018-04-18 09:11 UTC

This package is auto-updated.

Last update: 2024-08-29 05:12:19 UTC


README

安装此扩展的首选方式是通过 composer

运行以下命令之一

$ php composer.phar require  lubobill1990/yii2-simditor "*"

或者在您的 composer.json 文件的 require 部分添加

"lubobill1990/yii2-simditor": "*"

to

使用方法

像小部件一样

echo \lubobill1990\yii2\widget\Simditor::widget([
    'clientOptions'=>[
        'toolbarHidden' => false,
        'toolbar' => [//default true
            'title',
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'fontScale'
        ]
    ]
]);

像 ActiveForm 小部件一样

use lubobill1990\yii2\widget\Simditor;
echo $form->field($model, 'content')->widget(Simditor::class,[
    'clientOptions'=>[
        'toolbarHidden'=>false,
        'toolbar'=>[//default true
            'title',
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'fontScale'
        ]
    ]
]);

有关其他选项,请参阅此网站 http://simditor.tower.im/

声明

此包是从 anxu/yii2-simditor 分支出来的