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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
Jina AI
Jina AI
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
博客园 - 【当耐特】
雷峰网
雷峰网
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
Security Latest
Security Latest
有赞技术团队
有赞技术团队
L
Lohrmann on Cybersecurity
P
Proofpoint News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Hacker News - Newest:
Hacker News - Newest: "LLM"
NISL@THU
NISL@THU
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
B
Blog RSS Feed
Cyberwarzone
Cyberwarzone
K
Kaspersky official blog
F
Full Disclosure
Martin Fowler
Martin Fowler
Spread Privacy
Spread Privacy
D
Docker
C
Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page

博客园 - 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

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

我最终的定制效果如下: