找回密码
 注册账户
查看: 813|回复: 0

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

[复制链接]
tigerchao 发表于 2009-4-3 12:40:35 | 显示全部楼层 |阅读模式
在使用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";
您需要登录后才可以回帖 登录 | 注册账户

本版积分规则

存档|黑屋|手机|网络实验室 本站服务器由美国合租以及IDCLayer国际数据提供!!!

GMT+8, 2026-6-4 15:19 , Processed in 0.047980 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表