Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网站建设 > PHP > PHP中使用FCKeditor2.3.2配置
【标  题】:PHP中使用FCKeditor2.3.2配置
【关键字】:PHP,FCKeditor2.3.2
【来  源】:http://www.cublog.cn/u/6418/showart.php?id=223306

PHP中使用FCKeditor2.3.2配置

Your Ad Here

FCKeditor2.3.2在线编辑器非常好用,完全支持文件上传。今天baidu了一直午终于搞定了。 下载FCKeditor2.3.2,解压至FCKeditor。

1首先删除不必要的文件节省空间。凡是以_开头的文件如_samples,_testcases和一些用不到的.asp、.jsp、.cfm文件统统干掉。

2修改fckconfig.js
FCKConfig.AutoDetectLanguage = true ;//是否自动检测语言
FCKConfig.DefaultLanguage  = 'zh-cn' ;//设置语言
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;//设置皮肤
FCKConfig.TabSpaces = 1 ;//tab是否有效
FCKConfig.ToolbarStartExpanded = true ;//编辑工具条是否出现,等点“展开工具栏”时才出现
FCKConfig.FontNames  = '宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;//添加中文字体
修改FCKeditor\editor\css\fck_editorarea.css
设置默认字体及大小
body, td
{
 font-family: Arial, Verdana, Sans-Serif;
 font-size: 14px;
}

3关于文件上传的设置
修改fckconfig.js
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php

修改fckeditor\editor\filemanager\browser\default\connectors\php\config.php
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//设置上传的文件夹,可自己指定
修改fckeditor\editor\filemanager\upload\php\config.php
$Config['Enabled'] = true ;
$Config['UseFileType'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//同上要一样
4引入在线编辑器时只需
<?php
include("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;//实例化
$oFCKeditor->BasePath = 'fckeditor/';//这个路径一定要和上面那个引入路径一致,否则会报错:找不到fckeditor.html页面
//$oFCKeditor->Value = '' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->Create() ;
?>
JS用alert( FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true ))得到FCKeditor1的值;
PHP用$_POST['FCKeditor1']得到FCKeditor1的值。
类之间的关系(zz):【上一篇】
BEA Tuxedo应用程序开发笔记:【下一篇】
【相关文章】
  • php-5.2+mysql-max-5.0.27+httpd-2.2.3在FC5上编译通过
  • PageRank (PR) 值查询,PHP源代码
  • PHP空间推荐
  • Code:生成静态页面的PHP类
  • PHP 静态化实现方法
  • PHP开发框架的现状和展望
  • 世界上最快速,最高效,最合理的PHP程序编程方法[转载]
  • PHP和AJAX打造高级RSS聚合器
  • PHP5.2 + APACHE2.2 + BugFree1.0 的安装
  • 简单的PHP生成excel
  • 【随机文章】
  • 基于Nokia S40的猜数字游戏之一
  • 在HyperSnap-DX中实现滚屏截图又一法
  • IP地址转化为数字表示
  • 注册表编辑已被管理员禁用
  • 在这个世界成长
  • linux WEB全能服务器配置(总结)
  • modem recovery-time
  • 看看python吧
  • 淘金GSM新技术
  • C++习题与解析(重载-02)
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.