thinkphp3.2.3 整合 富文本编辑器

更改编辑器的ueditor.config.js

var URL = window.UEDITOR_HOME_URL || "资源文件根路径";
// 服务器统一请求接口路径
, serverUrl: URL + "../../../Admin/Ueditor/upload"

,initialFrameHeight:520  //初始化编辑器高度,默认320

框架中定义常量用来创建保存位置
'TMPL_PARSE_STRING'=>array(
'__UPLOAD__' => __ROOT__.'/data/',
'__STATICS__' => __ROOT__.'/statics/',
'__WEB_ROOT__'=>__ROOT__
),

如果提示上传文件根目录不存在,
1,文件权限问题 Linux下手动创建的文件没有权限
2,upload上传方法种的rootpath 和 savepath 路径不正确

富文本编辑框不会保存 html 模式下的代码 但是可以通过方法获取
function getContent() {
$('.htmlCode').val(UE.getEditor('content').getContent());
console.log(UE.getEditor('content').getContent());
$(".ajax-form").submit();
}
提交表单的时候 进行赋值然后提交 .
posted @ 2017-05-06 11:47  青柚  阅读(1517)  评论(0编辑  收藏  举报