我要做一个新闻发布系统,用到了fckeditor控件,查看了很多资料但是都不成功。我用的是fckeditor_2.6.4.zip和fckeditor-java-2.4.1-bin.zip,解压之后,我将fckeditor文件夹复制到工程下(是直接复制到工程下,和src平级的)。
然后将解压之后的包都复制到lib中(一共五个包,commons-fileupload-1.2.1.jar commons-io-1.3.2.jar fckeditor-java-core-2.4.1-javadoc.jar slf4j-api-1.5.2.jar slf4j-jdk14-1.5.6.jar)。
在index.jsp中添加代码
<%@ taglib uri="/FCKeditor" prefix="FCK"%>???????????????报错1
<body>
<form action="result.jsp" method="post">
<FCK:editor instanceName="content">
<jsp:attribute name="value">
您的内容.....
</jsp:attribute>
</FCK:editor>
<input type="submit" value="提交">
</form>
</body>
在xml文件下添加代码
<taglib>
<taglib-uri> /FCKeditor </taglib-uri> ??????报错2
<taglib-location> /fckeditor/fckconfig.js </taglib-location>??????报错3
</taglib>
运行的时候报错(报错行已标注)
我只是想显示出来上传文件的界面,谁能帮我解释一下,谢谢!
然后将解压之后的包都复制到lib中(一共五个包,commons-fileupload-1.2.1.jar commons-io-1.3.2.jar fckeditor-java-core-2.4.1-javadoc.jar slf4j-api-1.5.2.jar slf4j-jdk14-1.5.6.jar)。
在index.jsp中添加代码
<%@ taglib uri="/FCKeditor" prefix="FCK"%>???????????????报错1
<body>
<form action="result.jsp" method="post">
<FCK:editor instanceName="content">
<jsp:attribute name="value">
您的内容.....
</jsp:attribute>
</FCK:editor>
<input type="submit" value="提交">
</form>
</body>
在xml文件下添加代码
<taglib>
<taglib-uri> /FCKeditor </taglib-uri> ??????报错2
<taglib-location> /fckeditor/fckconfig.js </taglib-location>??????报错3
</taglib>
运行的时候报错(报错行已标注)
我只是想显示出来上传文件的界面,谁能帮我解释一下,谢谢!
1、下载
2、把你的fckeditor文件夹放到工作目录下,如直接放到WebContent下,WebContent\fckeditor
3、页面中使用导入:
<script type="text/javascript" src="${ct}/FCKeditor/fckeditor.js" charset="UTF-8"></script>加载:
<body onload="showFCK();">
function showFCK(){ var oFCKeditor_des = new FCKeditor('你自己的ID');
oFCKeditor_des.BasePath = '${ct }/FCKeditor/';
oFCKeditor_des.ToolbarSet = 'XX';
oFCKeditor_des.Width = '80%';
oFCKeditor_des.Height = '200';
oFCKeditor_des.ReplaceTextarea();}