sim2github/yii2-imperavi-module

Redactor module for Yii2 Framework.

Installs: 211

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 93

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2014-08-17 09:32 UTC

This package is not auto-updated.

Last update: 2019-09-29 02:25:31 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require sim2github/yii2-imperavi-module "dev-master"

or add

"sim2github/yii2-imperavi-module": "*"

to the require section of your composer.json file.

To use image and files manipulation

Add redactor module to your config

'modules' => [
        'redactor' =>  'sim2github\imperavi\Module',
],

ActiveForm usage:

		$form->field($model, 'content')->widget(sim2github\imperavi\widgets\Redactor::className(), [
			'options' => [
				'debug' => 'true',
			],
			'clientOptions' => [ // [More about settings](http://imperavi.com/redactor/docs/settings/)
				'convertImageLinks' => 'true', //By default
				'convertVideoLinks' => 'true', //By default
				//'wym' => 'true',
				//'air' => 'true',
				'linkEmail' => 'true', //By default
				'lang' => 'ru',
				'imageGetJson' =>  \Yii::getAlias('@web').'/redactor/upload/imagejson', //By default
				'plugins' => // [More about plugins](http://imperavi.com/redactor/plugins/)
					'ace',
					'clips', 
					'fullscreen'
				],
			],

		])

You can extend sim2github\imperavi\widgets\Redactor and overwrite init function to define your own settings by default.

Custom plugin

  • Ace Code editor like GitHub does. With Emmet extention.

Asset Source

Module use last version of redactor https://github.com/yiiext/imperavi-redactor-widget. Massive changes in Yii2 and Imperavi-redactor can brake some functionality.