PHP集成FCK的函数代码
程序员文章站
2022-03-23 07:57:15
复制代码 代码如下://定义一个函数用于调用fckeditor function call_fck($input_name,$input_value,$w='780',$h...
复制代码 代码如下:
//定义一个函数用于调用fckeditor
function call_fck($input_name,$input_value,$w='780',$h='580')
{
include_once 'fckeditor/fckeditor.php';
$fcked = new fckeditor($input_name) ;
$fcked->basepath = 'fckeditor/';
$fcked->toolbarset = 'simple' ; //工具栏设置
$fcked->instancename = $input_name ;
$fcked->width = $w;
$fcked->height = $h;
$fcked->value = $input_value;
$fck_area = $fcked->createhtml();
$this->smarty->assign('fck_area',$fck_area);
unset($fck_area) ;
unset($fcked) ;
}