This extension allows to add UEditor in a view.
Usage ¶
...how to use this extension...
...can use code blocks like the following...
- UEditor download
- UEditor extension download and copy UEditor.php under ext.ueditor
- 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
so exciting~
it's my first extension for yii.
Could you provide more information about UEditor?
Not just the download link, maybe some docs ....
Thanks!
thks, good job
more sample maybe great
some default config
UEditor extension with default config
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.