jsp 中添加文本编辑器fckeditor都需要下载什么,如何配置
1个回答
展开全部
下载一个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>
就好了
希望能帮到你
- <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>
就好了
希望能帮到你
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询