我配置好FCKeditor编辑器后,就设置了一个测试页面,在里边输入如下代码<?php
include("fckeditor/fckeditor.php"); // 包含fckeditor类,fckeditor目录放在网站根目录下
$BasePath = "/fckeditor/"; // 编辑器路径
$oFCKeditor = new FCKeditor('CreMer'); // 创建一个fckeditor对象,表单的名称为CreMer
$oFCKeditor->BasePath = $BasePath;
$oFCKeditor->Value = 'test'; // 设置表单初始值
// 还可设置以下部分("="包含部分),并非必须:
//==================================================================================//
$oFCKeditor->Width = '800'; //编辑器宽度,类中有默认值,如果不想修改可不管此项
$oFCKeditor->Height= '300'; // 同width,此处为高$oFCKeditor->ToolbarSet
$oFCKeditor->ToolbarSet = 'Default'; // 默认编辑器工具栏有Basic(基本工具)和Default(所有工具)两种选择,另外还可以自己建立工具栏
$oFCKeditor->Config['SkinPath'] = '/fckeditor/editor/skins/silver/'; // 设置编辑器皮肤
//==================================================================================//$oFCKeditor->Create(); // 调用类中方法,必须
echo $oFCKeditor->Value;
?>问下,我想把编辑器中已经编辑好的内容,以html源码的形式保存到数据库,有什么方法可以获取编辑器中的html源码?
include("fckeditor/fckeditor.php"); // 包含fckeditor类,fckeditor目录放在网站根目录下
$BasePath = "/fckeditor/"; // 编辑器路径
$oFCKeditor = new FCKeditor('CreMer'); // 创建一个fckeditor对象,表单的名称为CreMer
$oFCKeditor->BasePath = $BasePath;
$oFCKeditor->Value = 'test'; // 设置表单初始值
// 还可设置以下部分("="包含部分),并非必须:
//==================================================================================//
$oFCKeditor->Width = '800'; //编辑器宽度,类中有默认值,如果不想修改可不管此项
$oFCKeditor->Height= '300'; // 同width,此处为高$oFCKeditor->ToolbarSet
$oFCKeditor->ToolbarSet = 'Default'; // 默认编辑器工具栏有Basic(基本工具)和Default(所有工具)两种选择,另外还可以自己建立工具栏
$oFCKeditor->Config['SkinPath'] = '/fckeditor/editor/skins/silver/'; // 设置编辑器皮肤
//==================================================================================//$oFCKeditor->Create(); // 调用类中方法,必须
echo $oFCKeditor->Value;
?>问下,我想把编辑器中已经编辑好的内容,以html源码的形式保存到数据库,有什么方法可以获取编辑器中的html源码?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货