帝国cms 整合百度编辑器ueditor完整教程(图文)

 

 

一、UEditor简介

   帝国cms自带文本编辑器是fckeditor,用起来效果不太理想。

   百度也推出了自己的编辑器UEditor

   UEditor是由WEB前端研发部开发的所见即所得的开源富文本编辑器,具有轻量、可定制、用户体验优秀等特点。开源基于BSD协议,所有源代码在协议允许范围内可自由修改和使用。百度UEditor的推出,可以帮助不少网站开者在开发富文本编辑器所遇到的难题,节约开发者因开发富文本编辑器所需要的大量时间,有效降低了企业的开发成本。

   下边先来贴出几张相片浏览一下百度编辑器UEditor一些特色功能吧!

   

 

 

二、帝国CMS6.6整合UEditor

   1.根据自己cms的版本下载相应版本ueditor1.2.2_GBK.rarueditor1.2.2_utf8.rar

   2.上传至帝国cms的/e/data/ecmseditor/下

   3.修改字段输入表单,具体操作:系统-->新建表与系统模型-->管理数据表-->管理字段

   如下图所示

   

 

   4.将下列代码复制入下图所示红框内

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
< script type = "text/javascript" src = "/e/data/ecmseditor/ueditor/editor_config_admin.js" ></ script >   
< script type = "text/javascript" src = "/e/data/ecmseditor/ueditor/editor_all_min_admin.js" ></ script >   
< link rel = "stylesheet" href = "/e/data/ecmseditor/ueditor/themes/default/ueditor.css" >   
< script type = "text/plain" id = "myEditor" name = "newstext" >   
<?=$ecmsfirstpost==1?"":stripSlashes($r[newstext])?>   
</ script >   
< script type = "text/javascript" >   
var editor = new baidu.editor.ui.Editor();   
editor.render("myEditor");   
editor.classid = <?=$classid?>;   
editor.filepass = <?=$filepass?>;   
</ script >   
< table width = "100%" border = "0" cellpadding = "3" cellspacing = "1" bgcolor = "#DBEAF5" >   
           < tr >    
             < td bgcolor = "#FFFFFF" > < input name = "dokey" type = "checkbox" value = "1" <?=$r[dokey]==1?' checked':''?>>   
               关键字替换&nbsp;&nbsp; < input name = "copyimg" type = "checkbox" id = "copyimg" value = "1" >   
       远程保存图片(   
       < input name = "mark" type = "checkbox" id = "mark" value = "1" >   
       < a href = "SetEnews.php" target = "_blank" >加水印</ a >)&nbsp;&nbsp;    
       < input name = "copyflash" type = "checkbox" id = "copyflash" value = "1" >   
       远程保存FLASH(地址前缀:    
       < input name = "qz_url" type = "text" id = "qz_url" size = "" >   
               )</ td >   
           </ tr >   
           < tr >   
                      
     < td bgcolor = "#FFFFFF" >< input name = "repimgnexturl" type = "checkbox" id = "repimgnexturl" value = "1" > 图片链接转为下一页&nbsp;&nbsp; < input name = "autopage" type = "checkbox" id = "autopage" value = "1" > 自动分页   
       ,每    
       < input name = "autosize" type = "text" id = "autosize" value = "5000" size = "5" >   
       个字节为一页&nbsp;&nbsp; 取第    
       < input name = "getfirsttitlepic" type = "text" id = "getfirsttitlepic" value = "" size = "1" >   
       张上传图为标题图片(    
       < input name = "getfirsttitlespic" type = "checkbox" id = "getfirsttitlespic" value = "1" >   
       缩略图: 宽    
       < input name = "getfirsttitlespicw" type = "text" id = "getfirsttitlespicw" size = "3" value="<?=$public_r[spicwidth]?>">   
       *高   
       < input name = "getfirsttitlespich" type = "text" id = "getfirsttitlespich" size = "3" value="<?=$public_r[spicheight]?>">   
       )</ td >   
           </ tr >   
</ table >

   5./e/admin/AddNews.php,333行 <html>之上增加一行添加代码来解决某些浏览器可能错位问题

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

   6.关闭网页,重新启动。

转载于:https://www.cnblogs.com/ishang/archive/2013/03/19/2968572.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值