YII2下使用百度编辑器扩展yii2-ueditor
2014-12-25 10:20
615 查看
<span style="font-size:18px;color:#ff0000;"><strong>yii2-ueditor的安装</strong></span>
Yii2是使用composer来管理扩展的
Composer地址:
https://packagist.org/packages/wenyuan/yii2-ueditor
Git 地址:
![](file:///C:\Users\ADMINI~1\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.png)
composer如果是在path中的话可以直接
composer require --prefer-dist wenyuan/yii2-ueditor "*"
如果不想使用composer来管理扩展的话,也可以直接修改vendor/composer/autoload_psr4.php
前提是源码目录vendor/wenyuan/yii2-ueditor/源码
return array(
// 添加下面的代码
'wenyuan\\ueditor\\' => array($vendorDir . '/wenyuan/yii2-ueditor')
);
yii2-ueditor的使用
单个百度编辑器的使用
use wenyuan\ueditor\Ueditor; echo Ueditor::widget(['id'=>'newstext1']);
多个编辑器的使用
use wenyuan\ueditor\Ueditor; echo Ueditor::widget(['id'=>'newstext1']);
echo Ueditor::widget(['id'=>'newstext2']);
自定义编辑器功能模块
use wenyuan\ueditor\Ueditor;
echo Ueditor::widget(
[
'id'=>'newstext1',
'options' => [
'toolbars' => [
['fullscreen', 'source', 'undo', 'redo', 'bold'],
],
'autoHeightEnabled' => true,
'autoFloadEnabled' => true
]
]
);
其中id的作用
<script type="text/plain" id="newstext1" name="newstext1"></script>
相关文章推荐
- YII2下使用百度编辑器扩展yii2-ueditor(二)
- JSP版(utf8编码)的Ueditor百度文章编辑器配置以及使用说明
- JSP版(utf8编码)的Ueditor百度文章编辑器配置以及使用说明
- [转载]百度编辑器-Ueditor使用
- 百度UEditor编辑器使用教程与使用方法
- 关于Struts2+spring+maven中使用百度UEditor编辑器显示未找到上传数据的解决方案
- asp.net mvc4使用百度ueditor编辑器
- asp.net mvc5 使用百度ueditor 本编辑器完整示例(下)配置上传播放视频
- asp.net mvc4使用百度ueditor编辑器
- 百度编辑器-UEditor使用注意
- 百度Ueditor编辑器的使用
- asp.net mvc4使用百度ueditor编辑器
- 在使用 百度编辑器 Ueditor 时,不能进入 Controller 相应的 Action 的处理方法
- Ueditor(百度编辑器)的使用
- 记录一下使用百度Ueditor副编辑器的过程及碰到的问题
- 免费开源百度编辑器(UEditor)使用方法
- [转载] ASP.NET MVC4使用百度UEDITOR编辑器
- mvc4使用百度ueditor编辑器
- 超简单的DEDECMS整合百度编辑器(Ueditor)使用教程
- Ueditor1.4.3百度编辑器配置(包括上传图片)的使用心得