seagull 的publisher模块在0.6.7版本中的所见即所得编辑器只启用了基本工具,如何让它显示更多的工具呢,比如CSDN的编辑器那样的呢。
设置WYSIWYG的代码:
[www/js/SglFckconfig.js]
FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['About']
] ;
FCKConfig.ToolbarSets["Basic"] = [
['Source','-','Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','FontFormat','Outdent', 'Indent','-','About']
] ;
[default/templates/admin_header.html]
function fck_add(id)
{
i = oFCKEditors.length;
oFCKEditors[i] = new FCKeditor(id, '100%', 300);
oFCKEditors[i].ToolbarSet = 'Basic' ;
oFCKEditors[i].BasePath = SGL_JS_WEBROOT + "/wysiwyg/fckeditor/";
oFCKEditors[i].Config["CustomConfigurationsPath"] = SGL_JS_WEBROOT + "/js/SglFckconfig.js" ;
oFCKEditors[i].ReplaceTextarea();
}
把这行修改成下面这样就搞可以了
oFCKEditors[i].ToolbarSet = 'Default' ;