audriusdob/yii2-imperavi-redactor

Imperavi Redactor WYSIWYG小部件(为Yii 2 OEM许可)

安装: 33

依赖项: 0

建议者: 0

安全: 0

星星: 0

关注者: 2

分支: 53

开放性问题: 0

语言:JavaScript

类型:yii2-extension

dev-master 2015-10-01 14:39 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:42:56 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部分。