Yii 1.1: ueditor-extension-for-yii

Allows to add UEditor in a view
3 followers

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

Total 4 comments

#8557 report it
simeon at 2012/06/11 11:44pm
some default config
#8556 report it
YiieHR at 2012/06/11 09:33pm
thks, good job

more sample maybe great

#8536 report it
schmunk at 2012/06/11 04:03am
Could you provide more information about UEditor?

Not just the download link, maybe some docs ....

Thanks!

#8534 report it
simeon at 2012/06/11 03:43am
so exciting~

it's my first extension for yii.

Leave a comment

Please to leave your comment.

Create extension