经过两天的制作编辑功能,对fckeditor有了更新的认识,固然来此记录一下.
在proxy项目中由于,需要编辑功能,所以用到fckeditor其实这东西以前来来去去用到很多次,但都用的没有这次那么深入.好了费话不多讲下面来具体谈谈这次使用的心得.
首先到官网上www.fckeditor.net下载fckeditor-java-core-2.5.jar包和demo那个两个包.
然后参照着demo里的例子在项目中进行配置.这样fckeditor就能在项目中跑起来了
重要文件 fckconfig.js是最重要的文件很多的配置都是在这里设定 包括图片上传的显示,falsh文件上传的显示 等等一些
配置路径
1. 配置路径的方法有两种第一种是改变net.fckeditor.handler 里 default.perproties 文件 里的配置
2.新建fckeditor.perproties文件放在src目录上具体配置如下:
#
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2004-2009 Frederico Caldeira Knabben
#
# == BEGIN LICENSE ==
#
# Licensed under the terms of any of the following licenses at your
# choice:
#
# - GNU General Public License Version 2 or later (the "GPL")
# http://www.gnu.org/licenses/gpl.html
#
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
# http://www.gnu.org/licenses/lgpl.html
#
# - Mozilla Public License Version 1.1 or later (the "MPL")
# http://www.mozilla.org/MPL/MPL-1.1.html
#
# == END LICENSE ==
#
# Default properties for FCKeditor.Java
#
# @version $Id: default.properties 2927 2009-01-18 16:43:47Z mosipov $
# default allowed extensions settings
connector.resourceType.file.extensions.allowed = 7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip
connector.resourceType.image.extensions.allowed = bmp|gif|jpeg|jpg|png
connector.resourceType.flash.extensions.allowed = swf|fla
connector.resourceType.media.extensions.allowed = aiff|asf|avi|bmp|fla|flv|gif|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|png|qt|ram|rm|rmi|rmvb|swf|tif|tiff|wav|wma|wmv
# default resource type paths
connector.resourceType.file.path = /file
connector.resourceType.image.path = /image
connector.resourceType.flash.path = /flash
connector.resourceType.media.path = /media
# Due to security issues with Apache modules, it is recommended to leave this
# setting enabled.
connector.forceSingleExtension = true
# base URL path for the userfiles
connector.userFilesPath = /userfiles
# base system path on the backend for the userfiles
connector.userFilesAbsolutePath = /userfiles
# Instructs the Connector to check, if the uploaded image is really one
connector.secureImageUploads = true
# directory of the editor relative to the context root
fckeditor.basePath = /fckeditor
# default height of the editor
fckeditor.height = 200
# default toolbar set of the editor
fckeditor.toolbarSet = Default
# default width of the editor
fckeditor.width = 100%
# default implementations
connector.impl = net.fckeditor.connector.impl.ContextConnector
connector.userActionImpl = net.fckeditor.requestcycle.impl.DisabledUserAction
connector.userPathBuilderImpl = net.fckeditor.requestcycle.impl.ContextPathBuilder
localization.localeResolverImpl = net.fckeditor.localization.impl.AcceptLanguageHeaderResolver
这样就可以改变路径了
还有最重要的一点就是多在官网上看 技术手册 那怕e的 也必需看