struts1.2下使用ckeditor部分代码: <%
String content = request.getParameter("editor1");
if (content!=null&&content.equals("")){
out.println(content);
}
%> <html:textarea cols="80" name="editor1" rows="10" property="content">在此添加内容</html:textarea> <script type="text/javascript">
CKEDITOR.replace('editor1',
{
skin : 'kama',
language : 'zh-cn'
});
</script>运行起来就提示红色的那行有问题,可是我不明白有什么问题啊还有,把html去掉就能显示,但那就不是struts的表单了这到底是肿么了~
String content = request.getParameter("editor1");
if (content!=null&&content.equals("")){
out.println(content);
}
%> <html:textarea cols="80" name="editor1" rows="10" property="content">在此添加内容</html:textarea> <script type="text/javascript">
CKEDITOR.replace('editor1',
{
skin : 'kama',
language : 'zh-cn'
});
</script>运行起来就提示红色的那行有问题,可是我不明白有什么问题啊还有,把html去掉就能显示,但那就不是struts的表单了这到底是肿么了~
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/FCKeditor/fckeditor.js"></script><%--
<form action="show.jsp" method="post" target="_blank">
<FCK:editor id="content" basePath="/FCKeditor/"
width="700"
height="500"
skinPath="/FCKeditor/editor/skins/silver/"
toolbarSet = "Default"
>
input
</FCK:editor>
<input type="submit" value="Submit">
</form>
--%><form action="show.jsp" method="post" target="_blank">
<table border="0" width="700"><tr><td>
<textarea id="content" name="content" style="WIDTH: 100%; HEIGHT: 400px">input</textarea>
<script type="text/javascript">
var oFCKeditor = new FCKeditor('content') ;
oFCKeditor.BasePath = "${pageContext.request.contextPath}/FCKeditor/" ;
oFCKeditor.Height = 400;
oFCKeditor.ToolbarSet = "Default" ;
oFCKeditor.ReplaceTextarea();
</script>
<input type="submit" value="Submit">
</td></tr></table>
</form><%--
<form action="show.jsp" method="post" target="_blank">
<%
FCKeditor oFCKeditor ;
oFCKeditor = new FCKeditor( request, "content" ) ;
oFCKeditor.setBasePath( "/FCKeditor/" ) ;
oFCKeditor.setValue( "input" );
out.println( oFCKeditor.create() ) ;
%>
<br>
<input type="submit" value="Submit">
</form>
--%>
下面是显示页面
<%
String content = request.getParameter("content");
out.print(content);
%>