fonclub/yii2-tinymce

yii 框架的 TinyMCE 扩展

安装: 14

依赖: 0

建议: 0

安全: 0

星标: 0

关注者: 1

分叉: 9

类型:yii2-extension

1.0.0 2015-01-24 04:45 UTC

This package is auto-updated.

Last update: 2024-09-23 02:56:24 UTC


README

yii 框架的 TinyMCE 扩展

安装

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

运行以下命令之一

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

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

"fonclub/yii2-tinymce": "*"

to

使用

扩展安装后,只需在代码中使用即可

use fonclub\tinymce\TinyMCE;

echo TinyMCE::widget(['name' => 'text-content']);

$form->field($model, 'attribute')->widget(TinyMCE::className());

//toggle to tinyMCE or to textarea

echo TinyMCE::widget(['name' => 'text-content', 'toggle' => ['active' => true]]);

$form->field($model, 'attribute')->widget(TinyMCE::className(), [
	'toggle' => [
		'active' => true,
	]
]);

感谢 moonlandsoft/yii2-tinymce ;)