项目是ssh做的
找着网上直接在jsp里面添加下面代码,然后出来编辑器了,可是提交了后显示的是html源代码
这是加在jsp中的代码
[code="java"]<%@ page language="java" pageEncoding="gb2312"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
首页 》 日志 》 创建日志
<br> window.onload = function()<br> {<br> // Automatically calculates the editor base path based on the _samples directory.<br> // This is usefull only for these samples. A real application should use something like this:<br> // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.<br> //var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;<br> var sBasePath = "http://localhost:8080/blog/fckeditor/"<br> var oFCKeditor = new FCKeditor( 'diaryContent' ) ;<br> oFCKeditor.BasePath = sBasePath ;<br> oFCKeditor.ReplaceTextarea() ;<br> }<br>
日志标题: |
日志内容:
[/code]
这是没添加fckeditor编辑器之前,从数据库中取出diaryContent的代码
[code="java"]
内容:[/code]
显示页面
[quote]
sadff
[/quote]这个地方怎么改,才能在jsp页面上显示格式,而不是源代码,谢谢