2017 © Pedro Peláez
 

library imperavi-redactor-widget

Yii widget for redactor rich text editor

image

vollossy/imperavi-redactor-widget

Yii widget for redactor rich text editor

  • Wednesday, August 14, 2013
  • by vollossy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 170 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Imperavi Redactor Widget

ImperaviRedactorWidget is a wrapper for Imperavi Redactor, a high quality WYSIWYG editor., (*1)

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., (*2)

Usage

First, import the widget class file, (*3)

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

Next, call the widget:, (*4)

$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:, (*5)

$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., (*6)

$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',),
        ),
    ),
));

The Versions

14/08 2013

dev-master

9999999-dev

Yii widget for redactor rich text editor

  Sources   Download

The Requires

 

yii redactor