FCKeditor 中自带了两种工具栏样式,Default 和Base。可是我现在想再加一种工具栏样式。 我试了一下。将Default样式的设置复制了一下 改为FCKConfig.ToolbarSets["Blogedit"],里面个体的工具栏项我就不写了。可是当我在调用这个工具栏时,却提示我说工具 栏Blogedit设置没有找到,这是怎么回事啊?难道FCKeditor只能使用Def ault 和Base这两种样式吗? 找到 fckconfig.js 里面设置 这里我添加了 ddd 工具栏样式 要用的时候只需要 在
引用的时候 $this->ToolbarSet = 'ddd' ; 就OK 了
XML/HTML代码
- FCKConfig.ToolbarSets["Default"] = [
- ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
- ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
- ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
- ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
- '/',
- ['Bold','Italic','Underline','StrikeThrough','-','Subscrīpt','Superscrīpt'],
- ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
- ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
- ['Link','Unlink','Anchor'],
- ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
- '/',
- ['Style','FontFormat','FontName','FontSize'],
- ['TextColor','BGColor'],
- ['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
- ] ;
- FCKConfig.ToolbarSets["Basic"] = [
- ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
- ] ;
- FCKConfig.ToolbarSets["ddd"] = [
- ['OrderedList','UnorderedList','-','Link','Unlink','-','About','Bold','Italic','Underline','StrikeThroug
- h','-','Subscrīpt','Superscrīpt']
然后对FCKeditor控件里面ToolberSet属性进行设置。