php使用ueditor

一、下载地址:

  http://ueditor.baidu.com/website/download.html  (选择UBuilder版本)

二、配置ueditor

  在目录中找到editor_config文件

  在var URL下面添加一行

  

window.UEDITOR_HOME_URL="/ueditor/";  //地址为你命名的ueditor目录

 

三、ueditor获得编辑内容的方法

var ue = UE.getEditor('editor');    //实例化类
ue.getAllHtml()                       //获得整个html的内容
ue.getContent()                       //获得内容
ue.getContentTxt()                    //获得纯文本
ue.getPlainTxt()                      //获得带格式的纯文本
ue.hasContent()                       //判断是否有内容
ue.setHide()                          //隐藏编辑器
ue.setShow()                          //显示编辑器

 

 

posted @ 2013-04-05 16:05  忆殇之痕  阅读(435)  评论(0编辑  收藏  举报