编辑器FCKeditor2.6.3使用实例

一:下载
http://www.fckeditor.net/demo

二:压缩
1、保留根目录fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml、fckeditor_php4.php、fckeditor_php5.php及fckeditor.php其他的文件都删掉;
2、删除目录/editor/_source(事实上,所有_开头的文件夹或文件都是可以删除的);
3、删除/editor/filemanager/browser/default/connectors/下除PHP目录的所有目录
4、删除/editor/lang/下的除了 en.js, zh.js, zh-cn.js三个文件的所有文件

三:配置
1、启用中文语言包:打开Ffckconfig.js,修改第62行 FCKConfig.DefaultLanguage = ‘en’ ;将en改为zh-cn,
注:在FCKeditor2.6.3中,默认的支持的语言即为PHP,所以不用修改第276,277行。如果需要支持其他语言,请修改这里。
2、启用PHP文件上传功能:打开fckeditor/editor/filemanager/connectors/php/config.php第30行找到:$Config['Enabled'] = false 改成: $Config['Enabled'] = true 设置上传存放目录:第34行找到:$Config['UserFilesPath'] = ‘/userfiles/’ 改成: $Config['UserFilesPath'] = ‘改你自己的路径’

四,代码
<form action="test.php" method="POST">
<?php
include 'jinlin_smarty/fckeditor/fckeditor.php';                
$obj_editor=new FCKeditor('editor');
$obj_editor->Config['SkinPath']='/jinlin_smarty/fckeditor/editor/skins/silver/';
$obj_editor->BasePath='/jinlin_smarty/fckeditor/';
$obj_editor->Value=$about['content'];
$obj_editor->ToolbarSet='Basic';
$obj_editor->Width='700px';
$obj_editor->Height='500px';
$obj_editor->create();
?>
<input type="submit" value="ok">
</form>
//使用$_POST['editor']获取值

五:设置工具组
FCKConfig.ToolbarSets["Basic"] = [
 ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
 ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat','FitWindow','ShowBlocks'],
 '/',
 ['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'],
] ;

六,工具参考
EditSource 显示HTML源代码
StrikeThrough 删除线
Save 保存
NewPage 新建空白页面
Superscrīpt 上标
Subscrīpt 下标
Preview 预览
JustifyLeft 左对齐
Cut 剪切
Copy 复制
Paste 粘贴
JustifyCenter 居中对齐
JustifyRight 右对齐
JustifyFull 两端对齐
PasteText 纯文本粘贴
InsertOrderedList 自动编号
PasteWord 来自Word的粘贴
InsertUnorderedList 项目符号
Print 打印
Outdent 减少缩进
SpellCheck 拼写检查
Indent 增加缩进
Find 查找
ShowTableBorders 显示表格线
Replace 替换
ShowDetails 显示明细
Undo 撤销
Form 添加Form动作
Redo 还原
Checkbox 复选框
SelectAll 全选
Radio 单选按钮
RemoveFormat 去除格式
Input 单行文本框
Link 插入/编辑 链接
Textarea 滚动文本框
RemoveLink 去除连接
Select 下拉菜单
Anchor 锚点
Button 按钮
Image 插入/编辑 图片
ImageButton 图片按钮
Table 插入/编辑 表格
Hidden 隐藏
Rule 插入水平线
Zoom 显示比例
SpecialChar 插入特殊字符
FontStyleAdv 系统字体
UniversalKey 软键盘
FontStyle 字体样式
Smiley 插入表情符号
FontFormat 字体格式
About 关于
Font 字体
Bold 粗体
FontSize 字体大小
Italic 斜体
TextColor 文字颜色
Underline 下划线
BGColor 背景色

转载于:https://www.cnblogs.com/hidepeng/archive/2011/03/23/1992548.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值