惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - antistone

GoogleEarth截图技巧(转) Windows 7 中更改用户主目录 Sybase ASE ADO.NET驱动 乱码问题解决 C#开发Windows服务入门摘要 WinForm中使用Log4NET C# 中用信号量实现读者写者问题 测试Google文件的发布功能 Linux下OpenGL开发 -- 准备篇 FCKEditor的使用-asp 石头汤的故事 在JAVA中读取文件乱码的解决办法 Struts 内容简介(转) Xvid技术中的精彩部分[转] Marshal GetCurrentImage的MSND说明,暂记 C#中数据类型与其他语言中的数据类型之间的对应关系 神州数码网络无线校园网整体解决方案及特点 关于web应用程序安全的思考(序)(转) NHibernate快速指南
FCKEditor工具条定制
antistone · 2008-03-16 · via 博客园 - antistone

FCkEditor确实是一个非常优秀的HTML在线编辑器,它的功能确实很强大,而且也非常的灵活,具有很强的定制性。

FCKEditor默认的工具栏项目很多,我们完全可以对其进行自定制,以满足自己的需求。

网上也有很多介绍定制工具栏的方法。下面就是其中的一种:

在fckconfig.js中找到

FCKConfig.ToolbarSets 段,默认有两个工具条样式,一个是Default,一个是Basic(我的版本是2.5)。

增加如下一段:

 1FCKConfig.ToolbarSets["Custom"= [
 2    ['FontFormat','FontName','FontSize'],
 3    ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
 4    ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
 5    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
 6    ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
 7    ['Link','Unlink','Anchor'],
 8    ['TextColor','BGColor'],'/'
 9    ['Cut','Copy','Paste','PasteText','PasteWord'],
10    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
11    ['FitWindow','ShowBlocks','-','Source','About']        // No comma for the last row.
12] ;

然后再调用代码中做如下更改

注意第7行是新增的,指定所要使用的工具栏

 1<%
 2    Dim oFCKeditor
 3    Set oFCKeditor = New FCKeditor
 4    oFCKeditor.BasePath    = "edit/"
 5    oFCKeditor.Value    = ""
 6    oFCKeditor.Config("SkinPath")="/website/manage/edit/editor/skins/silver/"
 7    oFCKeditor.ToolbarSet = "Custom"
 8    oFCKeditor.Create "txtcontent"
 9%>
10

其定制语法很简单
[]  表示一个工具条,
[]  中的短横线'-'表示一个垂直分割线
''  两个单引号中间加一个标识符表示一个工具栏按钮,具体的对应关系可以自己找。
'/' 作用类似于一个回车。使该符号后面的工具栏新起一行排列。

我最终的定制效果如下: