1.配置
fckconfig.js
皮肤样式
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/';//default,office2003,silver
定制界面功能
FCKConfig.ToolbarSets["Default"]
FCKConfig.ToolbarSets["Basic"]
2.使用
php方式
直接输出
<?php
require_once("fckeditor/fckeditor.php") ;
?>
<form action="sampleposteddata.php" method="post" target="_blank">
<?php
$obj_fckeditor = new FCKeditor('FCKeditor');
$obj_fckeditor->BasePath = "fckeditor/";
//$obj_fckeditor->InstanceName = "str_fckeditor_test" ;
//$obj_fckeditor->ToolbarSet = 'Basic';
$obj_fckeditor->Width = 500;
$obj_fckeditor->Height = 400;
$obj_fckeditor->Value ='<p>This is some <strong>sample text</strong>. Youare using <ahref="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
$obj_fckeditor->Create();
?>
<br/>
<input type="submit" value="Submit">
</form>
smarty版
$str_fckeditor_test = $obj_fckeditor->CreateHtml();
html方式
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'FCKeditor' ) ;
oFCKeditor.BasePath = 'fckeditor/' ;
oFCKeditor.Height = 300 ;
oFCKeditor.Value = '<p>This is some<strong>sample text<\/strong>. You are using <ahref="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
oFCKeditor.Create() ;
//-->
</script>
<br/>
<input type="submit" value="Submit" />
</form>
3.图片上传
fckeditor\editor\filemanager\connectors\php\config.php
$Config['Enabled'] = true;
$Config['UserFilesPath'] = '/userfiles/';
4.文件管理器插件
kfm
http://kfm.verens.com/
http://kfm.verens.com/Using-KFM-as-a-plugin-for-FCKeditor
用到数据库
安装
* Unzip KFM into FCKeditor's editor/plugins/ directory
* rename the kfm-1.x directory to kfm
* copy configuration.php.dist to configuration.php
* edit configuration.php to your satisfaction.
o most variables are already set to a good default.
o you must configure a database. it can be a database you are already using for some other purpose.
o to use a database you are already using forsome other purpose, set the $kfm_db_prefix variable. that way, tableswill be created with that prefix (helps you tell them apart from yourother tables).
* add this to the bottom of your fckconfig.js:
FCKConfig.Plugins.Add('kfm');
* important: clear the cache in your browser
配置
fckeditor\editor\plugins\kfm\configuration.php
$kfm_db_type = 'mysql';
$kfm_db_prefix = 'kfm_';
$kfm_db_host = 'localhost';
$kfm_db_name = 'test';
$kfm_db_username = 'root';
$kfm_db_password = '';
$kfm_db_port = '';
$kfm_userfiles_address = 'D:/www/userfiles';