Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Imperavi Redactor WYSIWYG widget (OEM-licensed for Yii)
JavaScript CSS PHP

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

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 Yii.


First, import the widget class file


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
    'options' => array(
        'lang' => 'en',
        '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
    '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
            'baseUrl' => '/js/my_plugin',
            'css' => array('clips.css',),
            'js' => array('clips.js',),
            // add depends packages
            'depends' => array('imperavi-redactor',),
Something went wrong with that request. Please try again.