在PHP中使用功能强大的FCKeditor
来源:互联网 发布:红中麻将源码 编辑:程序博客网 时间:2024/05/01 15:47
FCKeditor2.3.2在线编辑器非常好用,完全支持文件上传。今天baidu了一直午终于搞定了。下载FCKeditor2.3.2,解压至FCKeditor。
一:首先删除不必要的文件节省空间。凡是以_开头的文件如_samples,_testcases和一些用不到的.asp、.jsp、.cfm文件统统干掉。
二:修改fckconfig.js
FCKConfig.AutoDetectLanguage = true ;//是否自动检测语言
FCKConfig.DefaultLanguage = 'zh-cn' ;//设置语言
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;//设置皮肤
FCKConfig.DefaultLanguage
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;
}
设置默认字体及大小
body, td
{
font-family: Arial, Verdana, Sans-Serif;
font-size: 14px;
}
三:关于文件上传的设置
修改fckconfig.js
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
修改fckeditor/editor/filemanager/browser/default/connectors/php
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//设置上传的文件夹,可自己指定
$Config['UserFilesPath'] = '/UserFiles/' ;//设置上传的文件夹,可自己指定
修改fckeditor/editor/filemanager/upload/php/config.php // 这个没有找到
$Config['Enabled'] = true ;
$Config['UseFileType'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//同上要一样
$Config['UseFileType'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//同上要一样
四:引入在线编辑器时只需
<?php
include("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;//实例化
$oFCKeditor->BasePath = 'fckeditor/';//这个路径一定要和上面那个引入路径一致,否则会报错:找不到fckeditor.html页面
include("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;//实例化
$oFCKeditor->BasePath = 'fckeditor/';//这个路径一定要和上面那个引入路径一致,否则会报错:找不到fckeditor.html页面
//$oFCKeditor->Value = '' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->ToolbarSet = 'Default' ; //可以自己精简toolbar
$oFCKeditor->Create() ;//可以用$oFCKeditor->CreateHtml()
?>
$oFCKeditor->Create() ;//可以用$oFCKeditor->CreateHtml()
?>
JS用alert( FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true ))得到FCKeditor1的值;
PHP用$_POST['FCKeditor1']得到FCKeditor1的值。
//大家可以在接收表单页面print_r($_POST)就明白了
- 在PHP中使用功能强大的FCKeditor
- PHP 中使用 FCKeditor
- php中快速使用fckeditor
- PHP中使用FCKeditor编辑器
- php中快速使用fckeditor
- fckeditor 在php中开启图片上传的功能
- 在JSP中使用FCKeditor
- 在Smarty中使用FCKeditor
- FCKeditor结合PHP的使用
- PHP使用FCKEditor的配置
- FCKEditor在PHP中的使用(FCKEditor入门)与配置
- 什么是FCKeditor?功能强大的HTML编辑器!
- fckeditor在Php中配置详解
- FCKeditor在PHP+SMARTY中的使用
- FCKeditor在PHP+SMARTY中的使用
- PHP中功能强大却少使用的函数 -- 为你提供更多的思路
- FCKEditor在.net的使用
- FCKEditor在.net的使用
- 怎么监测Tomcat JDBC连接池的状况?
- asp.net中异步调用webservice
- .NET平台下WEB应用程序的部署(安装数据库和自动配置)
- show一下刚做的系统登录界面
- 怎么样设置代理IP
- 在PHP中使用功能强大的FCKeditor
- 继承 [Employee 1]
- CEC1.3A的features及其消息
- JavaScript的Static Variable和Instance Property
- 在DataGrid页眉上添加全选的CheckBox控件
- 设置vimrc
- .Net程序打包安装与卸载制作 ——问题描述(一)
- Microwindows及其中文化方法
- 通过Web Services显示和下载文件