PHP code example of yiiext / imperavi-redactor-widget
1. Go to this page and download the library: Download yiiext/imperavi-redactor-widget library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yiiext / imperavi-redactor-widget example snippets
$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',
),
));
$this->widget('ImperaviRedactorWidget', array(
// The textarea selector
'selector' => '.redactor',
// Some options, see http://imperavi.com/redactor/docs/
'options' => array(),
));
$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',),
),
),
));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.