ueditor-extension-for-yii Allows to add UEditor in a view

  1. Usage
  2. Resources

This extension allows to add UEditor in a view.

Usage

...how to use this extension...

...can use code blocks like the following...

  1. UEditor download
  2. UEditor extension download and copy UEditor.php under ext.ueditor
  3. add the following code to your view file
<?php
    $this->widget('ext.ueditor.UEditor',
            array(
                'id'=>'editor',
                'model'=>$model,
                'attribute'=>'content',
                'UEDITOR_CONFIG'=>array(
                    'UEDITOR_HOME_URL'=>Yii::app()->baseUrl.'/ueditor/',
                    'initialContent'=>'欢迎',
                    'imageUrl'=>Yii::app()->baseUrl.'/ueditor/php/imageUp.php',
                    'imagePath'=>Yii::app()->baseUrl.'/ueditor/php/',
                    'emotionLocalization'=>true,
                    'pageBreakTag'=>'[page]',
                    /*
                    'toolbars'=>array(
                        array(
                            'fullscreen', 'source', '|', 'undo', 'redo', '|',
                        ),
                    ),
                    'labelMap'=>array(
                        'fullscreen'=>'全屏','source'=>'源代码','redo'=>'重做','undo'=>'撤销',
                    ),
                    */
                ),
                
            ));
?>

Below is an example of directory organization

WebRoot/  
   assets  
   protected/  
       components/  
       controllers/  
       extensions/  
           ueditor/  
               UEditor.php  
       models/  
       views/  
   ueditor/   //(copy ueditor code resources,please download UEditor first )                  
   index.php  
   index-test.php  

UEditor download

Resources

3 0
3 followers
1 681 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: simeon
Created on: Jun 11, 2012
Last updated: 11 years ago

Downloads

show all

Related Extensions