<
display-name
>
FCKeditor
在线文本编辑器的使用配置
</
display-name
>
<
servlet
>
<
servlet-name
>
Connector
</
servlet-name
>
<
servlet-class
>
com.fredck.FCKeditor.connector.ConnectorServlet
</
servlet-class
>
<
init-param
>
<
param-name
>
baseDir
</
param-name
>
<!--
此为文件浏览路径
-->
<
param-value
>
/uploads/
</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
debug
</
param-name
>
<
param-value
>
true
</
param-value
>
</
init-param
>
<
load-on-startup
>
1
</
load-on-startup
>
</
servlet
>
<
servlet
>
<
servlet-name
>
SimpleUploader
</
servlet-name
>
<
servlet-class
>
com.fredck.FCKeditor.uploader.SimpleUploaderServlet
</
servlet-class
>
<
init-param
>
<
param-name
>
baseDir
</
param-name
>
<!--
此为文件上传路径,需要在
WebRoot
目录下新建
UserFiles
文件夹
-->
<!--
根据文件的类型还需要新建相关的文件夹
Image
、
Flash -->
<
param-value
>
/uploads/
</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
debug
</
param-name
>
<
param-value
>
true
</
param-value
>
</
init-param
>
<
init-param
>
<!--
此参数为是否开启上传功能
-->
<
param-name
>
enabled
</
param-name
>
<
param-value
>
true
</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
AllowedExtensionsFile
</
param-name
>
<
param-value
></
param-value
>
</
init-param
>
<
init-param
>
<!--
此参数为文件过滤,以下的文件类型都不可以上传
-->
<
param-name
>
DeniedExtensionsFile
</
param-name
>
<
param-value
>
php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi
</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
AllowedExtensionsImage
</
param-name
>
<
param-value
>
jpg|gif|jpeg|png|bmp
</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
DeniedExtensionsImage
</
param-name
>
<
param-value
></
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
AllowedExtensionsFlash
</
param-name
>
<
param-value
>
swf|fla
</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>
DeniedExtensionsFlash
</
param-name
>
<
param-value
></
param-value
>
</
init-param
>
<
load-on-startup
>
1
</
load-on-startup
>
</
servlet
>
<
servlet-mapping
>
<
servlet-name
>
Connector
</
servlet-name
>
<
url-pattern
>
/editor/filemanager/browser/default/connectors/jsp/connector
</
url-pattern
>
</
servlet-mapping
>
<
servlet-mapping
>
<
servlet-name
>
SimpleUploader
</
servlet-name
>
<
url-pattern
>
/editor/filemanager/upload/simpleuploader
</
url-pattern
>
</
servlet-mapping
>
|
// 文件开头处加入
<%@ taglib uri="
http://fckeditor.net/tags-fckeditor" prefix="FCK" %>
//要使用的地方加入(id=”content”为此组件的标识)
<FCK:editor id="
content" basePath="/你的web应用程序名/"
imageBrowserURL="/你的web应用程序名/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="/你的web应用程序名/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
flashBrowserURL="/你的web应用程序名/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="/你的web应用程序名/editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="/你的web应用程序名/editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="/你的web应用程序名editor/filemanager/upload/simpleuploader?Type=Flash"> </FCK:editor>
|
//注意这个"
content"就是在<FCK:editor>中设置的id。
request.getParameter("
content");
|
FCKConfig.ToolbarSets[
"qiujyDefault"
] = [
[
'Source'
,
'Templates'
],
[
'Cut'
,
'Copy'
,
'Paste'
,
'PasteText'
,
'PasteWord'
],
[
'Find'
,
'Replace'
,
'-'
,
'SelectAll'
,
'RemoveFormat'
,
'Table'
],
[
'Bold'
,
'Italic'
,
'Underline'
,
'StrikeThrough'
,
'-'
,
'Subscript'
,
'Superscript'
,
'-'
,
'Outdent'
,
'Indent'
],
[
'OrderedList'
,
'UnorderedList'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'Link'
,
'Unlink'
],
[
'TextColor'
,
'BGColor'
],
[
'Image'
,
'Flash'
,
'Rule'
,
'Smiley'
,
'-'
,
'Form'
,
'Checkbox'
,
'Radio'
,
'TextField'
,
'Textarea'
,
'Select'
,
'Button'
,
'-'
,
'About'
],
[
'Style'
,
'FontFormat'
,
'FontName'
,
'FontSize'
]
] ;
FCKConfig.ToolbarSets[
"qiujyBasic"
] = [
[
'Bold'
,
'Italic'
,
'Underline'
,
'StrikeThrough'
,
'-'
,
'OrderedList'
,
'UnorderedList'
,
'Rule'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyFull'
,
'-'
,
'Link'
,
'Unlink'
,
'-'
,
'TextColor'
,
'BGColor'
,
'-'
,
'Smiley'
,
'About'
]
] ;
|