在线编辑器fckeditor简单应用

2、fckeditor配置
$sBasePath = $_SERVER['PHP_SELF'];$sBasePath = dirname($sBasePath).'/'; 
 
 
$oFCKeditor = new FCKeditor('FCKeditor1');$oFCKeditor->BasePath  = $sBasePath ;
 
dirname ,取得路径目录命的函数
 
3、fckeditor的应用
 
$oFCKeditor->Create();  创建一个窗口出来
 
$oFCKeditor->Value='初始值';
 
提交时,直接使用实例化时的名称 'FCKeditor1'
 
 
require "./FCKeditor/fckeditor.php";
 
$myFCKeditor = new FCKeditor("content");  // 创建FCKeditor实例,可创建多个实例
$myFCKeditor->BasePath = './FCKeditor/';
 
 
echo $_POST['content'];
posted @ 2012-07-15 12:36  gxldan  阅读(115)  评论(0编辑  收藏  举报