日期:2014-05-18  浏览次数:20689 次

jsp中怎么改变FCKeditor 中的背景色
实现方法
1  
在   java语句中配置   FCKeditor
<%
          oFCKeditor.setBasePath(   "/FCKeditor/ "   )   ;
  oFCKeditor.setToolbarSet( "Basic ");
  oFCKeditor.setHeight( "250 ");
          oFCKeditor.setValue( " ");  

%>
这里可以设置背景色吗

2   利用脚本改变

FCKeditor返回的静态html为

<input   type= "hidden "   id= "cont "   name= "cont "   value= " "> <input   type= "hidden "   id= "cont___Config "   value= " "> <iframe   id= "cont___Frame "   src= "../FCKeditor/editor/fckeditor.html?InstanceName=cont&Toolbar=Basic "   width= "100% "   height= "250 "   frameborder= "no "   scrolling= "no "> </iframe>


在 </body> 前写
<script>
document.frames[ 'cont___Frame '].body.bgcolor= "#33FFFF ";
</script>      
不起作用????

------解决方案--------------------
fckconfig.js中:

.......
FCKConfig.Debug = false ;
FCKConfig.AllowQueryStringDebug = true ;
-------设置样式-----------------------
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/ ' ; |
------------------------------
FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif ', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif ' ] ;

FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/ ' ;

.......