dungphanxuan / yii2-imperavi-redactor
Imperavi Redactor WYSIWYG小部件(针对Yii 2的OEM许可)
dev-master
2015-08-12 09:07 UTC
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-18 09:46:22 UTC
README
为Tourista创建
ImperaviRedactorWidget
是Imperavi Redactor的包装器,一个高质量的WYSIWYG编辑器。
注意,Imperavi Redactor本身是专有商业版权软件,但由于Yii社区购买了OEM许可,您可以使用它与Yii免费使用。
使用模型
yii\imperavi\Widget::widget([ // You can either use it for model attribute 'model' => $my_model, 'attribute' => 'my_field', // or just for input field 'name' => 'my_input_name', // Some options, see http://imperavi.com/redactor/docs/ 'options' => [ 'toolbar' => false, 'css' => 'wym.css', ], ]);
或者,您可以通过调用将Redactor附加到已经存在的DOM元素
yii\imperavi\Widget::widget([ // Some options, see http://imperavi.com/redactor/docs/ 'options' => [], ]);
资源包中插入了的redactor插件。
yii\imperavi\Widget::widget([ 'options' => [ 'lang' => 'ru', ], 'plugins' => [ 'fullscreen', 'clips' ] ]);
安装
安装此扩展的首选方法是通过composer。
运行
php composer.phar require asofter/yii2-imperavi-redactor "*"
或者将
"asofter/yii2-imperavi-redactor": "*"
添加到您的composer.json
文件的require部分。