在使用fckeditor 的过程中,经常需要根据实际需要来设置工具栏,显示或隐藏工具栏上的部分按钮。
在默认情况下,fckeditor显示了全部的工具栏。在fckconfig.js中有两个工具栏的配置方案,一个是Default,一个是Basic。我们可以按照他的格式自定义几个选项。
FCKConfig.ToolbarSets["c1"] = [ ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'], ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], '/', ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Link','Unlink','Anchor'], '/', ['Style','FontFormat','FontName','FontSize'], ['TextColor','BGColor'], ['FitWindow','ShowBlocks','-','About'] // No comma for the last row. ] ;
在页面中使用fckeditor时可以写成这样
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.ToolbarSet="c1";
Appreciation for this ifrnomtaion is over 9000-thank you!
5SV2nq ohcoolaxxfkq