js/fckeditorcode_gecko_2.js和fckeditorcode_ie_2.js加如下代码
FCKToolbar.prototype.Create函数中加
FCKConfig.AdvanceTableNum++;for(i=0;i<FCKConfig.AdvanceTable.length;i++){if(FCKConfig.AdvanceTableNum==FCKConfig.AdvanceTable[i]){e.setAttribute('advance',true);e.style.display='none';break;};};
fckconfig.js加如下代码
FCKConfig.AdvanceTableNum = 0; FCKConfig.AdvanceTable = [2,3,4,5];
FCKConfig.AdvanceTable 是简单模式下需要隐藏的按钮
fckeditor.html加如下代码
function chg(){ var d = document.getElementsByTagName("table"); for(i=0 ; i<d.length; i++){ if(d[i].getAttribute("advance")){ d[i].style.display=(d[i].style.display=="none")?"":"none"; } } var div1 = document.getElementById("chgbtn1"); var div2 = document.getElementById("chgbtn2"); if(div1.style.display == "none"){ div1.style.display = ""; div2.style.display = "none"; }else{ div1.style.display = "none"; div2.style.display = ""; } }
并在<td id="eToolbar" class="TB_ToolbarSet"></td>下面加
<td align="right" class="TB_ToolbarSet" width="60px" valign="bottom">
<a href="javascript:void(0);" onClick="chg();" style="font-size:12px;">
<span id="chgbtn1" style="display:none;">简单功能</span>
<span id="chgbtn2" >全部功能</span></a>
</td>