RSS
热门关键字:  csf  c语言  CSS  asp  数据结构
当前位置 : 主页»WEB开发»DIV+CSS»

DEDECMS的FCKeditor引用也DIV+CSS

来源:本站原创 作者:admin 时间:05-25 19:26:12 浏览:

    可视化编辑器FCKeditor功能虽然强大,但是有些设置还是需要自行修改。

    发现FCKeditor中的引用功能还是通过Table来实现,可是现在的网页一般都是用div+css来布局,因此现在我们也把它改成div+css的,使其更符合xhtml标准,而且还能代码更少还能节省更多的数据库空间。

    首先打开目录FCKeditor\editor\js下的fckeditorcode_ie_2.js文件,找到这段代码:

代码: var quoteString = "<table style='border-right: #cccccc 1px dotted; table-layout: fixed; border-top: #cccccc 1px dotted; border-left: #cccccc 1px dotted; border-bottom: #cccccc 1px dotted' cellspacing=0 cellpadding=6 width='95%' align=center border=0>\r\n";
  quoteString += "<tr><td style='word-wrap: break-word' bgcolor='#fdfddf'>\r\n<font color='#FF0000'>以下为引用的内容:</font><br>\r\n";
  quoteString += "</td></tr></table>\r\n";

    修改为:

代码:  var quoteString = "<span class=quote>\r\n";
  quoteString += "<span>以下为引用的内容:</span>\r\n";
  quoteString += "</span>\r\n";

    为了使用更少的代码,我们把CSS代码放到网页中,这样就不会每引用一次就要加入重复的CSS,首先打开文章页面的CSS文件,假设为article.css,文章正文部分包含在ID content中,找到#content ,在下面加入以下代码:

代码: /*---------------内容页:正文引用*/
#content span.quote {
 width:92%;
 display:block;
 padding:3px 10px;
 margin:10px auto;
 color:#000000;
 background:#FDFDDF;
 border:1px #cccccc dotted;
}
#content span.quote span {
 color:#FF0000;
 display:block;
}


上一页12 下一页
最新评论共有 8 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名评论
立即注册账号