FCKeitor默认提供了两种方式 Default,Basic.
Default:
Basic:
而他的配置文件fckconfig.js里的代码是这样的
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','-','Subscript','Superscript'],
['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']
] ;
从代码中不难看出我们可以自己手动修改要显示的内容。
我们可以把最常用的放在一起,去掉那些不常用的。我们可以有两种方法修改。
1.直接在原来的基础上增加或删除
例如我们可以在Basic里添加 ['Style','FontFormat','FontName','FontSize'],
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About'] ,
['Style','FontFormat','FontName','FontSize']
]
这样在使用时就显示样式,字体,字体大小等。
2.新建一个自己的类型。
FCKConfig.ToolbarSets["My"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','Image','Flash','Table','Rule','Smiley']
] ;
这样你在fckeditor的属性toolbarset里设成My就可以使用了。
所以你可以自己设置自己喜欢的工具栏。
附:仿百度空间工具栏
要仿照(关键在于看看fck的可变性)这样一个比较简洁的功能界面 可以做如下改变
基础的改变是fckconfig.js和editor/fckeditor.html文件
可以新建两个工具界面配置
FCKConfig.ToolbarSets["Mybasic"] = [
['Bold','Italic','-','Link','Unlink','Image','-','FontSize','TextColor','-']
] ;
FCKConfig.ToolbarSets["Myall"] = [
['Bold','Italic','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','Link','Unlink','Image','-','FontName','FontSize','TextColor','BGColor','-']
] ;
然后在fckeditor.html中script中加入
function chang(ToobarStyle){
var a = document.getElementById("sptool");
var b = document.getElementById("alltool");
if(ToobarStyle == 'Mybasic'){
ToobarStyle = 'Mybasic';
a.style.display = "none";
b.style.display = "inline";
}else{
ToobarStyle = 'Myall';
a.style.display = "inline";
b.style.display = "none";
}
FCK.ToolbarSet.Load(ToobarStyle || 'Mybasic');
}
表格中改成
<td id="xToolbar" class="TB_ToolbarSet"></td>
<td align="right" class="TB_ToolbarSet" width="60px"> <a href="javascript:void(0);" id="sptool" onClick="chang('Mybasic');" style="font-size:12px;display:none;">简单功能</a><a id="alltool" href="javascript:void(0);" onClick="chang('Myall');" style="font-size:12px;">全部功能</a></td>
<td class="TB_SideBorder" style="width: 1px"></td>
- 大小: 27.6 KB
- 大小: 16.4 KB
- 大小: 12.1 KB
分享到:
相关推荐
在FCKeditor目录里的fckconfig.js打开,找到FCKConfig.ToolbarSets[“Default”] 这里的设置是配置功能按钮...($this->ToolbarSet= ‘你自己命的名name’ ;) 复制代码 代码如下:<?php include(“editor/fckeditor1
FCKEDITOR提供了一套用于定制其外观,特性及行为的设置集.主配置文件名为Fckconfig.js 你既可以编辑主配置文件,也可以自己定义单独的配置文件.配置文件使用JAVASCRIPT语法. 修改后,在建立编辑器时,可以使用以下语法:...
复制代码 代码如下:/* * showfck() 编辑器调用函数 * @name 名字 (必须) * @val value默认值 * @toolbarset fck工具栏名字 * @width 宽度 * @height 高度 */ function showfck($name, $val= ”, $toolbarset = ”,...
4.5.2 自定义ToolbarSet, 去掉一些不需要的功能 12 4.5.3 加上几种常用的字体 13 4.5.4 修改“回车” 和 “Shift + 回车”的换行行为 13 4.5.5 修改编辑区的样式文件 14 4.5.6 更换表情图片 14 4.5.7 编辑区域的...
复制代码 代码如下://定义一个函数用于调用FCKeditor function call_fck($input_name,$input_value,$w=’... $fcked->ToolbarSet = ‘Simple’ ; //工具栏设置 $fcked->InstanceName = $input_name ; $fcked->Width =
Dim oFCKeditor Set oFCKeditor = New FCKeditor ...oFCKeditor.ToolbarSet = "Default" oFCKeditor.Width = "98%" oFCKeditor.Height = "500px" oFCKeditor.Value = "" oFCKeditor.Create "logbody" %>
由于给FCKeditor瘦身,所以常会报缺少对象支持等错误,只要...在fckconfig.js中用这样的标签[]来划分每行的元素的多少,这样就可以控制toolbar的长短和大小了,具体示例参看:fckconfig.js中的toolbarset[”Default”]
1、将fckeditor目录置入CI_PATH/... $config[‘fckeditor_toolbarset_default’] = ‘Default’; 3、创建helper,在/system/application/helpers新建form_helper.php 复制代码 代码如下:<?php if (!defined(‘BA
博客系统 仿新浪的博客系统 可供演示用 1.博文修改: 是否需要从数据库中查出这篇博文,然后...在这里编辑您的博客正文吧" basePath="/user/fckeditor" toolbarSet="myToolbar" height="300" width="800"></FCK:editor>
使用方法 <?...//FckEditor编辑器初始化 ... $ofck = new FCKeditor("content");...$ofck->ToolbarSet = "Default"; $ofck->Width = "100%"; $ofck->Height = "500px"; echo $ofck->CreateHtml(); ?>
二、JS调用fckeditor方法。 复制代码 代码如下: <?... // 包含fckeditor类, $oFCKeditor = new FCKeditor... //编辑器所在目录 $oFCKeditor->ToolbarSet=”Yiyunnet”; // 默认编辑器工具栏有Basic(基本工具) Defau
刚才在论坛上看到一个童鞋分享的方法,感觉不是很全面,现在分享下我的...//编辑器所在目录 $editor->ToolbarSet = “Normal”;//工具栏的名字,可以根据自己的需求加载其他的 $editor->Width = “95%”;//宽度度 $edit
以允许上传功能,Connector Servlet的baseDir参数值用于设置上传文件存放的位置 在web.xml最后添加标签定义: <taglib-uri>/TestFCKeditor <taglib-location>/WEB-INF/FCKeditor.tld 现在的web.xml文件没有...
没法下载,到这里折腾一把试试。 本文由abc2253130贡献 doc文档可能在WAP端浏览体验不佳。建议您优先选择TXT,或下载源文件到本机查看。 C#(WINFORM)学习 一、 C#基础 基础 类型和变量 类型和变量 类型 C# 支持两...
oFCKeditor.ToolbarSet = 'Abc' ; oFCKeditor.Height=400; //oFCKeditor.Width=400; //oFCKeditor.Value="aaaaaa"; oFCKeditor.ReplaceTextarea() ; } 4. 不支持图片?处理办法: A. 复制fckeditor.properties 到...
$editor->ToolbarSet = 'Normal'; $editor->Width = '100%'; $editor->Height = '320'; $editor->Value = $input_value; $FCKeditor = $editor->CreateHtml(); $smarty->assign('FCKeditor', $FCKeditor)...
$editor->ToolbarSet = 'Normal'; $editor->Width = '100%'; $editor->Height = '320'; $editor->Value = $input_value; $FCKeditor = $editor->CreateHtml(); $smarty->assign('FCKeditor', $FCKeditor); } ...