龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

FCKeditor在PHP环境下自定义工具条

时间:2009-12-17 12:00来源:未知 作者:admin 点击:
分享到:
在使用fckeditor 的过程中,经常需要根据实际需要来设置工具栏,显示或隐藏工具栏上的部分按钮。 在默认情况下,fckeditor显示了全部的工具栏。在fckconfig.js中有两个工具栏的配置方案

在使用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";

精彩图集

赞助商链接