tingMce 使用是发现,路径有问题

头jsp文件

<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%
String contextPath = request.getContextPath();
%>
<title></title>

<script language="javascript" type="text/javascript" src="../../../../plugins/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
language: "zh",
mode : "textareas",
skin : "o2k7",
// skin_variant : "silver",
//定义显示类别
theme : "advanced",
//定义载入插件
// plugins : "pagebreak,table,advimage,bramus_cssextras,advlink,media,contextmenu,paste,fullscreen,noneditable,template,inlinepopups",
plugins : "spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager,syntaxhl,",

//定义工具栏的位置
theme_advanced_toolbar_location : "top",
//定义工具栏工具的对其方式
theme_advanced_toolbar_align : "left",
//定义输入框下方是否显示状态栏,默认不显示
theme_advanced_statusbar_location : "bottom",
//定义是否可以改变输入窗口大小
theme_advanced_resizing : true,
theme_advanced_source_editor_height : "450",

remove_linebreaks : false,
extended_valid_elements : "textarea[cols|rows|disabled|name|readonly|class]" ,

content_css : "css/example.css",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect,",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,syntaxhl,",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
// theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",

// theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect,syntaxhl-editor",
// theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
// theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
// theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
});
</script>
</script>




使用tinyMCE的页面

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="se.sziit.domain.core.Ge_test"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String contextPath = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="/tinymce_config.jsp"></jsp:include>
<jsp:include page="/common_head.jsp" />
<script type="text/javascript">

function save(){
var form = document.forms[0];
form.action='<%=contextPath%>/core/homePage/contentManage/ge_test/save.action';
form.submit();
}
</script>

<title></title>
</head>
<body>
<div id="man_zone">
<div align="right">
<input icon="icon-retry" type="button" value="返回" css="btn"
onclick="javascript:history.go(-1)" />
</div>
<form name="AddForm" method="post" id="formID"
action="javascript:save()">
<s:token></s:token>
<table width="99%" border="0" align="center" cellpadding="3"
cellspacing="1" class="table_style">
<tr>
<td width="18%" class="left_title_1">
<span class="left-title">NAME:</span>
</td>
<td width="82%">
<textarea id="ge_test.name" class="validate[required]"
type="text" name="ge_test.name" >${ge_test.name}</textarea>
</td>
</tr>
</table>
<center>
<input icon="icon-save" type="button" css="btn" value="保存" />
</center>
</form>
</div>
</body>
</html>


TinyMCE插件是放在webRoot下
我想,目录应该是
<script language="javascript" type="text/javascript" src="/plugins/tiny_mce/tiny_mce.js"></script>就可以了啊
可就是要
<script language="javascript" type="text/javascript" src="../../../../plugins/tiny_mce/tiny_mce.js"></script>才能行
又求解决....
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值