require_once('smarty.inc.php'); //smarty配置 require_once('FCKeditor/fckeditor.php'); //fck文件 /** * 生成编辑器 * @param string input_name 输入框名称 * @param string input_value 输入框值 */ function create_html_editor($input_name, $input_value = '') { global $tpl , $global ; $editor = new FCKeditor($input_name) ; $editor->BasePath = "common/lib/FCKeditor/"; $editor->ToolbarSet = "Basic"; $editor->Width = "100%"; $editor->Height = "320"; $editor->Value = $input_value; $editor->Config['AutoDetectLanguage'] = true ; $editor->Config['DefaultLanguage'] = 'en' ; $FCKeditor = $editor->CreateHtml(); $tpl->assign("FCKeditor", $FCKeditor); } /* 创建 html editor */ create_html_editor('FCKeditor1');
发表评论