WebjxCom提示:
PHP教程:php调用fckeditor函数.
PHP代码
/*
*showfck()编辑器调用函数
*@name名字(必须)
*@valvalue默认值
*@toolbarsetfck工具栏名字
*@width宽度
*@height高度
*/
functionshowfck($name,$val='',$toolbarset='',$width='100%',$height='200'){
$classname='fckname';
echo"<divclass="$classname">";
require_onceWEB_ROOT.'./include/fckeditor/fckeditor.php';
$fck=newFCKeditor($name);
$fck->BasePath='./include/fckeditor/';
$fck->Config['CustomConfigurationsPath']=$fck->BasePath.'custom_config.js';
$fck->ToolbarSet=$toolbarset;
$fck->Value=$val;
$fck->Width=$width;
$fck->Height=$height;
$fck->Create('');
echo"</div>";
}