FCKEditor文字编辑控件使用有感
2008-11-21 11:18
363 查看
在一个Web2.0的项目中需要让用户对录入的文字和图片进行相关Office中Word一样的排版和编辑处理,所以使用了FCKEditor控件(版本为:2.6.1),以下为我处理的一些感想。
FCKConfig.ToolbarSets["Default"]= [
['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.
];
还修改以下内容,适合ASP.NET使用:
FCKConfig.DefaultLanguage
= 'zh-cn';
// 'en'
var _FileBrowserLanguage
= 'aspx' ;
// asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage
= 'aspx' ;
// asp | aspx | cfm | lasso | perl | php | py
2 在项目中引入FCKEditor控件相关的DLL文件
DLL文件下载地址:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=137125
3 在工具栏中引入FCKEditor控件的DLL文件
4 修改/配置FCKEditor控件上传路径
在FCKeditor/editor/filemanager/connectors/aspx/config.aspx中修改
privatebool CheckAuthentication()
{
//WARNING : DO NOT simply return "true". By doing so, you are allowing
//"anyone" to upload and list the files in your server. You mustimplement
//some kind of session validation here. Even something very simple as...
//
// return ( Session["IsAuthorized" ] != null && (bool)Session["IsAuthorized" ] == true );
//
//... where Session[ "IsAuthorized" ] is set to "true" assoon as the
//user logs in your system.
returntrue;
// false;
}
在SetConfig()函数中设置
UserFilesPath =
"~/Upload/FCKEditor/"
//FCKEditor控件上传路径
我写的Demo地址如下:
http://download.csdn.net/detail/GodHeaven/794932 http://download.csdn.net/source/794932
FCKEditor的详细设置
1 fckconfig.js中修改FCKConfig.ToolbarSets["Default"]= [
['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.
];
还修改以下内容,适合ASP.NET使用:
FCKConfig.DefaultLanguage
= 'zh-cn';
// 'en'
var _FileBrowserLanguage
= 'aspx' ;
// asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage
= 'aspx' ;
// asp | aspx | cfm | lasso | perl | php | py
2 在项目中引入FCKEditor控件相关的DLL文件
DLL文件下载地址:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=137125
3 在工具栏中引入FCKEditor控件的DLL文件
4 修改/配置FCKEditor控件上传路径
在FCKeditor/editor/filemanager/connectors/aspx/config.aspx中修改
privatebool CheckAuthentication()
{
//WARNING : DO NOT simply return "true". By doing so, you are allowing
//"anyone" to upload and list the files in your server. You mustimplement
//some kind of session validation here. Even something very simple as...
//
// return ( Session["IsAuthorized" ] != null && (bool)Session["IsAuthorized" ] == true );
//
//... where Session[ "IsAuthorized" ] is set to "true" assoon as the
//user logs in your system.
returntrue;
// false;
}
在SetConfig()函数中设置
UserFilesPath =
"~/Upload/FCKEditor/"
//FCKEditor控件上传路径
我写的Demo地址如下:
http://download.csdn.net/detail/GodHeaven/794932 http://download.csdn.net/source/794932
相关文章推荐
- 在页面中使用文字编辑控件
- Asp.net中使用WEB编辑控件FCKEditor
- Asp.net中使用WEB编辑控件FCKEditor
- Asp.net中使用FCKEditor WEB编辑控件
- ASP.NET 文字编辑控件 KindEditor使用方法
- 单知识点运用---使用代码编辑页面控件时不同分辨率的自适应
- 语法高亮编辑控件Scintilla在MFC中的简单使用之完整示例
- 使用JQuery 做仿asp.net 中的gridview 控件编辑效果
- swing中JList控件使用:每一项以 图片+文字(文字在图片的下面) 的形式显示并且在水平方向排列
- HTML编辑控件CKEditor的使用
- 开源的源代码编辑控件Scintilla的使用
- 03-07 创建和编辑AutoCAD实体(七) 向图形中添加文字(1)使用文字样式
- 如何在 Windows 环境下使用 Scintilla 编辑控件?收藏
- 使用FileUpload控件上传图片并自动生成缩略图、自动生成带文字和图片的水印图
- 在IE8中使用padding设置select控件文字垂直居中
- Edit Control 编辑框控件之EN_KILLFOCUS消息使用 笔记
- Asp.net的GridView控件实现单元格可编辑方便用户使用
- 如何使用 ComboBox 控件来编辑 Visual C# 中 ListView 控件中数据
- primeFaces 日历控件<p:calendar> 防止编辑功能使用小结
- dskinlite(uieasy mfc界面库)使用记录2:绘制动态元素(按钮控件绘制元素动态控制,改变图片和文字)