Imperavi Redactor Widget

Imperavi Redactor WYSIWYG widget(OEM 授权用于 Yii)。「Imperavi Redactor WYSIWYG widget (OEM-licensed for Yii)」

Github星跟蹤圖

Imperavi Redactor Widget

ImperaviRedactorWidget is a wrapper for Imperavi Redactor,
a high quality WYSIWYG editor.

Note that Imperavi Redactor itself is a proprietary commercial copyrighted software
but since Yii community bought OEM license you can use it for free with both Yii 1.1.x and Yii 2.0.x.

This repository contains an extension for 1.1.x. For 2.0.x check https://github.com/vova07/yii2-imperavi-widget.

Usage

First, import the widget class file

Yii::import('ext.imperavi-redactor-widget.ImperaviRedactorWidget');

Next, call the widget:

$this->widget('ImperaviRedactorWidget', array(
	// 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' => array(
		'lang' => 'ru',
		'toolbar' => false,
		'iframe' => true,
		'css' => 'wym.css',
	),
));

Alternatively you can attach Redactor to already existing DOM element by calling:

$this->widget('ImperaviRedactorWidget', array(
	// The textarea selector
	'selector' => '.redactor',
	// Some options, see http://imperavi.com/redactor/docs/
	'options' => array(),
));

The redactor plugins plugged in with packages of resources.

$this->widget('ImperaviRedactorWidget', array(
	'selector' => '.redactor',
	'options' => array(
		'lang' => 'ru',
	),
	'plugins' => array(
		'fullscreen' => array(
			'js' => array('fullscreen.js',),
		),
		'clips' => array(
			// You can set base path to assets
			'basePath' => 'application.components.imperavi.my_plugin',
			// or url, basePath will be ignored.
			// Defaults is url to plugis dir from assets
			'baseUrl' => '/js/my_plugin',
			'css' => array('clips.css',),
			'js' => array('clips.js',),
			// add depends packages
			'depends' => array('imperavi-redactor',),
		),
	),
));

主要指標

概覽
名稱與所有者yiiext/imperavi-redactor-widget
主編程語言JavaScript
編程語言PHP (語言數: 3)
平台
許可證Other
所有者活动
創建於2011-08-19 08:39:43
推送於2017-05-09 16:45:25
最后一次提交2017-02-28 21:03:23
發布數47
最新版本名稱v1.3.18 (發布於 )
第一版名稱v0.7 (發布於 2012-09-11 13:59:13)
用户参与
星數406
關注者數91
派生數152
提交數125
已啟用問題?
問題數110
打開的問題數4
拉請求數14
打開的拉請求數1
關閉的拉請求數11
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?