FCKeditor_2.6.3使用攻略for PHP
感觉一个字:爽!
先从官网http://www.fckeditor.net/下载FCKeditor_2.6.3.zip
解压后把fckeditor整个目录放在文档根目录下
1、在项目根目录下建一个myconfig.js
2、在新的文件里填入内容(自己随意填吧,)
3、修改/fckeditor/fckconfig.js的内容的第一句。
FCKConfig.CustomConfigurationsPath = '' ;
修改为
FCKConfig.CustomConfigurationsPath = '/myconfig.js' ;
这样就加载了自定义配置文件。
注:这步也可以不做。
修改/fckeditor/editor/filemanager/connectors/php/config.php
1、最开始补一句。
session_start(); //允许会话
2、
$Config['Enabled'] = false ;
下面加一句
$Config['Enabled'] = true ;
3、注:这是相对于apache的文档根目录的
$Config['UserFilesPath'] = '/userfiles/' ;
下面加一句
$Config['UserFilesPath'] = '/temp/' ;
4、注:这是相对于硬盘目录的,且必须与上一条相符合
$Config['UserFilesAbsolutePath'] = '' ;
下面加一句
$Config['UserFilesAbsolutePath'] = 'd:\\www\\temp\\' ;
假定我的网站是windows,放在d:\www目录下,我想把用户上传的图象保存在
d:\\www\\temp\\下,对应的文档目录是/temp/
如果是linux,完全一样,自行修改
之所以用会话,原因不说也清楚,不可能把所有上传的图象放到同一目录下啊。
所以上面的语句3、4可以自行修改。
总之,就这两个文件一个js,一个php,
如果需限制图象文件的类型,需要在两个文件同时修改,自己看看吧,很简单的
可以在根目录下建一个test_fck.php文件自己测试
<?php
define('ROOT_PATH', './');
include_once( ROOT_PATH . "fckeditor/fckeditor.php") ; //php使用必须
?>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form action="" method="post" target="_blank">
<?php
$oFCKeditor = new FCKeditor('content') ; //参数可能代表了表单元素的name,实际使用中我自己提交前用js强行赋值document.getElementById('content').value = FCKeditorAPI.GetInstance('content').GetXHTML();
$oFCKeditor->BasePath = '/fckeditor/' ; //这句话必须这样写
$oFCKeditor->Value = '<p> <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;//默认的值,正常都是写$oFCKeditor->Value = '';
$oFCKeditor->Height = 500 ; //高度
$oFCKeditor->Create() ; //echo html代码
?>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>
xieye:以上内容参照了官网的说明http://www.fckeditor.net/
分享到:
相关推荐
FCKeditor_2.6.5与FCKeditor_2.6.3FCKeditor_2.6.5与FCKeditor_2.6.3FCKeditor_2.6.5与FCKeditor_2.6.3FCKeditor_2.6.5与FCKeditor_2.6.3FCKeditor_2.6.5与FCKeditor_2.6.3
FCKeditor_2.6.3课程资源完整版 FCKeditor_2.6.3.zip+fckeditor-java-2.4.1-bin.zip+fckeditor-java-demo-2.4.war课程资源全部文件。不用再找别的了。
FCKeditor.Net_2.6.3.zip和FCKeditor-v2.6.3
FCKeditor_2.6.3+FCKeditor-2.3.rar
FCKEditor_2.6.3_Demo.zip
FCKeditor.Net_2.6.3 全中文版本 ,是我修改了你面所有的英文界面和英文提示,全中文版
FCKeditor_2.6.3.zip fckeditor-java-2.4-bin.zip fckeditor-java-2.4-src.zip fckeditor-java-demo-2.4.war 全套整理好了提供下载,自己找个完整的发了点时间,提供完整下载,方便网友~
FCKeditor_2.6.3.beta
很不错的资源,在先编辑器,可以编辑图文混合的文本,aspx版本
包含FCKeditor_2.6.3.zip及fckeditor-java-2.4-bin.zip以及详细的配置方法。 本人做的jsp网站一直都在用这个。
内包含fckeditor-java-2.4-bin.zip,fckeditor-java-2.4-src.zip,fckeditor-java-demo-2.4-beta-1.war,FCKeditor_2.6.3.zip和传智播客上面的视频配置一样的
FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器。它志于轻量化,不需要太复杂的安装步骤即可使用。它可和PHP、JavaScript、ASP、ASP.NET、ColdFusion、Java、以及ABAP等不同的编程语言相结合...
FCKeditor_2.6.3和FCK的配置文档,按照文档可以按照想要的,添加和删除编辑器中的内容。
FCKeditor.Net_2.6.3 FCKeditor.Net_2.6.3
FCKeditor_2.6.4 and FCKeditor.Net_2.6.3 支持asp.net的文本编辑器,包含编辑器文件和。net支持控件
完整的在线文字编辑工具,是做Blog和日志的很舒服的工具,完整的配置方法,帮你做好你的网站!
FCKeditor.Net_2.6.3.zip ,FCKeditor.dll
包括fckeditor_2.6.3.rar
FCKeditor.Net_2.6.3 .net例子 FCKeditor.Net_2.6.3 .net例子