配置FCKeditor

配置环境:
FCKeditor_2.6.zip
FCKeditor-2.3.zip(java)
apache-tomcat-5.5.20
[b]javascript版本配置过程:[/b]
[u][b]详细的官方Guide:http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide[/b][/u]
[b]第一步[/b]:将FCKeditor_2.6解压放入project下的fckeditor包下面(注意路径)。
[b]第二步[/b]:在project下的任意jsp或html中加入
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
[b]第三步[/b]:在此页中加入
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;
oFCKeditor.BasePath = "fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>(具体页面省略)
javascript版本完成,详细见官方Guide.

[b]java版本配置过程:[/b]
第一步:将FCKeditor下的editor包和fckconfig.js,fckeditor.afp,fckeditor.cfc,fckeditor.js,fckeditor.lasso,fckpackager.xml,fckstyles.xml,fcktemplates.xml拷贝到project下的FCKeditor包下。
第二步:在jsp页中使用
<%@ taglib prefix="FCKeditor" uri="http://fckeditor.net/tags-fckeditor" %>
第三步:在jsp页中写FCKeditor标签如下:
<FCKeditor:editor id="editorDefault"
imageBrowserURL="editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
flashBrowserURL="editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="editor/filemanager/upload/simpleuploader?Type=Flash"
>([color=red]这一步要注意:如果editor等包并不在FCKeditor下的话,就需要写FCKeditor标签的basePath,而且各个URL都必须包括basePath。而bashPath的形式:/project/path/to/package/editor,亦即basePath包含了从webapp以后到editor包的所有路径[/color])
第四步(补充):
在FCKeditor和webwork集成时,由于webwork先解析httpServletRequest,造成FCKeditor解析失败;而且FCKeditor虽解析中文路径,但在重命名上传文件时使用中文路径造成乱码而无法读取,所以舍去FCKeditor的上传功能。
在FCKconfig.js里改变
FCKConfig.LinkUpload = false;
FCKConfig.ImageUpload= false;
FCKConfig.FlashUpload = false;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值