yii2basic下使用ueditor
来源:互联网 发布:联通是什么网络模式 编辑:程序博客网 时间:2024/04/30 00:24
1、下载ueditor,在yii2目录的web文件夹下新建的public文件夹,把ueditor放入public下
2、在view下新建ueditor.php文件
<?phpuse yii\helpers\Html;use yii\bootstrap\ActiveForm;/* @var $this yii\web\View引入相关js文件 */<?=Html::jsFile('@web/public/ueditor/ueditor.config.js')?><?=Html::jsFile('@web/public/ueditor/ueditor.all.min.js')?><?=Html::jsFile('@web/public/ueditor/lang/zh-cn/zh-cn.js')?><?php $form = ActiveForm::begin([ 'id' => 'upload', 'enableAjaxValidation' => false, 'options' => ['enctype' => 'multipart/form-data']]);?><?= $form->field($model, 'content')->textarea(['rows' => 100, 'id' => 'editor', 'class' => 'col-sm-1 col-md-12']); ?><?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?><?php ActiveForm::end(); ?><script type="text/javascript"> window.onload=function(){ var ue = UE.getEditor('editor');//把ueditor实例化到textarea表单上,注意getEditor()参数为表单id }</script>
3、
0 0
- yii2basic下使用ueditor
- ThinkPHP下使用Ueditor
- ThinkPHP下使用Ueditor
- thinkphp下ueditor的使用
- .net下如何引入和使用UEditor
- 在spring下使用百度编辑器ueditor
- springmvc下富文本UEditor的使用
- Linux下nodejs(一):UEditor 使用
- 使用Ueditor
- ueditor使用
- UEditor使用
- ueditor 使用
- 使用UEditor
- Ueditor 使用
- 使用UEditor
- ueditor使用
- YII2下使用百度编辑器扩展yii2-ueditor
- YII2下使用百度编辑器扩展yii2-ueditor(二)
- (乱码问题大都是由于工具之间的编码格式不统一)Oracle字符集的查看查询和Oracle字符集的设置修改
- [黑马程序员]——Java调用C/C++
- ZOJ 3866 Cylinder Candy(对体积和表面积 积分)
- Form表单自动提交
- poj1860 bellford man判正环
- yii2basic下使用ueditor
- 百度云服务器 CentOS 图形界面支持
- linked类简单实现,和模板类放置问题
- 基于ucosii+x86pc的俄罗斯方块源码
- 数据挖掘十大经典算法个人总结
- 黑马程序员——Java基础语法
- 关联式容器
- SqlServer 数据库邮件
- Remove Linked List Elements -- leetcode