当前位置: 首页 > 图文教程 > 网络编程 > PHP > FCKeditor添加自定义按钮

PHP
PHP新手总结的PHP基础知识
php实现gb2312和unicode间编码转换
用php语言实现数据库连接详细代码介绍
详细解析 PHP 向 MySQL 发送数据过程
利用PHP V5开发多任务应用程序
详细讲解PHP中缓存技术的应用
php escapeshellcmd多字节编码漏洞
《PHP设计模式介绍》导言
《PHP设计模式介绍》第一章 编程惯用法
《PHP设计模式介绍》第二章 值对象模式
《PHP设计模式介绍》第三章 工厂模式
《PHP设计模式介绍》第四章 单件模式
《PHP设计模式介绍》第五章 注册模式
《PHP设计模式介绍》第六章 伪对象模式
《PHP设计模式介绍》第七章 策略模式
《PHP设计模式介绍》第八章 迭代器模式
《PHP设计模式介绍》第九章 观测模式
《PHP设计模式介绍》第十章 规范模式
《PHP设计模式介绍》第十一章 代理模式
《PHP设计模式介绍》第十二章 装饰器模式

PHP 中的 FCKeditor添加自定义按钮


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 220 ::
收藏到网摘: n/a

我想在FCKeditor 中的工具栏上添加一个按钮,在哪个配置文件中修改?答案很简单。

在FCKeditor目录里的fckconfig.js打开,找到FCKConfig.ToolbarSets["Default"] 这里的设置是配置功能按钮的,你需要的留下,不需要的可以删掉,也可以注释掉。

如需要多种配置,可以设置多个FCKConfig.ToolbarSets["你自己命个名name"] 后面跟配置详情。在引用编辑器的时候,以PHP为例:把fckeditor.php复制一个命名fckeditor1.php,在这里可以改配置。($this->ToolbarSet= '你自己命的名name' ;)

复制代码 代码如下:

<?php
include("editor/fckeditor1.php") ;//这里调用
$oFCKeditor = new FCKeditor('FormContent') ;//实例化
$oFCKeditor->BasePath = 'editor/';//这个路径一定要和上面那个引入路径一致,否则会报错:找不到fckeditor.html页面
//$oFCKeditor->Value = '' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->Create() ;
?>