jsp 中添加文本编辑器fckeditor都需要下载什么,如何配置

 我来答
波光0JA
2011-12-03
知道答主
回答量:22
采纳率:0%
帮助的人:8万
展开全部
下载一个fckeditor的压缩包,将这段话加到你的WEB-INF文件夹地下的web.xml中

- <servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/fckeditor/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
</servlet-mapping>
- <servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/fckeditor/editor/filemanager/upload/simpleuploader</url-pattern>
</servlet-mapping>

- <servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
- <init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</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>
<param-value>/UserFiles/</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 />
</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 />
</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 />
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

在你要添加的页面中加入
<script type="text/javascript">
var oFCKeditor = new FCKeditor('info');
oFCKeditor.BasePath = '../fckeditor/';
oFCKeditor.ToolbarSet = 'Common';
oFCKeditor.Width = '600';
oFCKeditor.Height = '300';
oFCKeditor.Value = 'info';//这块输入你该控件的名称
oFCKeditor.Create();
</script>

然后在<head>里边引入
<script type="text/javascript" src="../fckeditor/fckeditor.js"></script>
就好了
希望能帮到你
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式