自己的FCK编辑器功能设置
浏览量:492 | 分类:PHP | 发布日期:2009-08-07
模板引擎调用FCK函数
代码如下
-
function create_html_editor($input_name, $w, $h, $toolbarset='Default', $input_value = '')
-
{
-
global $ttpl ;
-
-
$editor = new FCKeditor($input_name) ;
-
$editor->BasePath = URL_LIB."fckeditor/";
-
-
$editor->ToolbarSet = $toolbarset;
-
$editor->Width = $w;
-
$editor->Height = $h;
-
$editor->Value = $input_value;
-
$editor->Config['AutoDetectLanguage'] = true ;
-
$editor->Config['DefaultLanguage'] = 'en' ;
-
$FCKeditor = $editor->CreateHtml();
-
-
$ttpl->assign_var("FCKeditor", $FCKeditor);
-
-
}
代码如下
-
include(DIR_LIB."fckeditor/fckeditor.php");
-
$fck = create_html_editor('content',760,500,'Myfck');
fckconfig.js 自定义FCK按钮
代码如下
-
FCKConfig.ToolbarSets["Myfck"] = [
-
['FontSize'],
-
['Preview','-','RemoveFormat','Bold','Italic','Underline'],
-
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
-
['TextColor'],
-
['Link','Unlink'],
-
['Image','Flash','PageBreak','UGeSHi','Source']// No comma for the last row.
-
] ;
本程序调用
上一篇: 开篇
下一篇: 我要嫁给灰太狼 [转]
杩?? 2010-05-21 00:04:23
瑙??灞