配置方法,把下载下来的zip文件解压到php网站的根目录下,默认文件夹名是"fckeditor"
在需要加入编辑器的页面里面引用fckeditor/fckeditor.php,即
<?php include("fckeditor/fckeditor.php");?>
在需要加入编辑器的地方加入如下代码: $oFCKeditor = new FCKeditor('FCKeditor1') ;//建立对象
$oFCKeditor->BasePath = 'FCKeditor/' ;//FCKeditor所在的位置
$oFCKeditor->ToolbarSet = 'Default' ;//工具按钮
$oFCKeditor->Width = '50%';//宽
$oFCKeditor->Height ='500';//高
$oFCKeditor->Value ='Hello';//默认显示的文字
$oFCKeditor->Create() ;
其中FCKeditor1对应textarea中的name属性
看看吧,不出意外的话配置成功。
如果你感觉FCKEditor提供的功能太多,有许多功能用不到的话,可以自己建立自定义的ToolbarSet具体方法就是打开fckediotr目录下的fckconfig.js,加入如下代码:
//在名为"Default"的toolbarset里面包含了所有fck的功能,英语好的自己看看吧
FCKConfig.ToolbarSets["自定义toolbarset名称"]=[ [需要显示的功能]]
就这么多吧,应该没什么问题了
在需要加入编辑器的页面里面引用fckeditor/fckeditor.php,即
<?php include("fckeditor/fckeditor.php");?>
在需要加入编辑器的地方加入如下代码: $oFCKeditor = new FCKeditor('FCKeditor1') ;//建立对象
$oFCKeditor->BasePath = 'FCKeditor/' ;//FCKeditor所在的位置
$oFCKeditor->ToolbarSet = 'Default' ;//工具按钮
$oFCKeditor->Width = '50%';//宽
$oFCKeditor->Height ='500';//高
$oFCKeditor->Value ='Hello';//默认显示的文字
$oFCKeditor->Create() ;
其中FCKeditor1对应textarea中的name属性
看看吧,不出意外的话配置成功。
如果你感觉FCKEditor提供的功能太多,有许多功能用不到的话,可以自己建立自定义的ToolbarSet具体方法就是打开fckediotr目录下的fckconfig.js,加入如下代码:
//在名为"Default"的toolbarset里面包含了所有fck的功能,英语好的自己看看吧
FCKConfig.ToolbarSets["自定义toolbarset名称"]=[ [需要显示的功能]]
就这么多吧,应该没什么问题了
作者:noel@淘宝网女装新款秋装连衣裙裤子外套上衣_2012时尚女装新款 Ecmall二次开发-PHP技术
地址:http://www.laohucheng.com/post/173/
版权所有©转载时必须以链接形式注明作者和原始出处及本声明!
Tags: php配置fckeditor 引用(0)
PHP集成FCK的函数代码
一些常用的javascript函数(方法)
2009
11:41
601
0


