您当前的位置:首页 > 徒行 > 学海无涯网站首页学海无涯
帝国cms7.0安装Ueditor(图文)
发布时间:2014-12-15编辑:阅读()
UEditor是由百度web前端研发部开发所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点,开源基于BSD协议,允许自由使用和修改代码...
帝国cms自带的web编辑器是帝国cms自带文本编辑器是fckeditor,用起来效果不太理想。
趁着今天有空,我就上网找教程试着把ueditor整合到帝国cms中去:
1.下载ueditor安装包,地址:http://ueditor.baidu.com/website/download.html#ueditor,我选择的是ueditor1.2.6.1的php版本。
2.解压ueditor压缩包,把文件夹上传到你的网站根目录下的e/data/ecmseditor/。
3.进入帝国cms后台,路径:系统>数据表与系统模型>管理数据表;然后选择下图中被红框框住的管理字段。
4.如下图
5.如下图
6.把下图红框部分的代码换成第7步的代码(记得备份之前的代码,以防万一)
7.替换代码:
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
41
42
43
44
45
46
47
48
49
50
51
52 |
<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 ':' '?>> 关键字替换 <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>) <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" > 图片链接转为下一页 <input name= "autopage" type= "checkbox" id= "autopage" value= "1" > 自动分页 ,每 <input name= "autosize" type= "text" id= "autosize" value= "5000" size= "5" > 个字节为一页 取第 <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> |
8./e/admin/AddNews.php,333行 <html>之上增加一行添加代码来解决某些浏览器可能错位问题
1
2 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" > |
9.为了能在前台显示代码高亮,必须在内容模板里的head头部加入以下代码。
1
2
3
4
5
6
7
8
9
10
11 |
<link id= "syntaxhighlighter_css" href= "/e/data/ecmseditor/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css" rel= "stylesheet" type= "text/css" /> <script src= "/e/data/ecmseditor/ueditor/ueditor.parse.js" type= "text/javascript" > </script> <script id= "syntaxhighlighter_js" src= "/e/data/ecmseditor/ueditor/third-party/SyntaxHighlighter/shCore.js" type= "text/javascript" ></script> <script type= "text/javascript" > SyntaxHighlighter.all(); </script> |
10.大公告成,现在重启网页,你就可以用了
关键字词:
[!--temp.ad--]
下一篇:返回列表
相关文章
-
无相关信息