📄 webeditor.jsp
字号:
<%@ page contentType="text/html; charset=GB2312" import="java.sql.*" import="java.lang.*" %>
<%@ page import="com.gforce.currency.*,java.util.*" %>
<%
Request m_request = new Request(request);
String strContentID=m_request.GetString("id");
String strIsFullScreen = m_request.GetString("fullscreen");
String strToolBar = m_request.GetString("toolbar");
String strShowStaticBar = m_request.GetString("showstaticbar");
if(strToolBar.equalsIgnoreCase("mini")&&!strShowStaticBar.equalsIgnoreCase("1"))
{
strShowStaticBar="0";
}
if(strIsFullScreen.equalsIgnoreCase("1"))
{
strShowStaticBar="1";
}
String strStyleName = m_request.GetString("style");
String strStyleFilePath="CoolBlue";
String strImgFilePath="standard";
if(strStyleName.equalsIgnoreCase("standard"))
{
strStyleFilePath="Office";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_light"))
{
strStyleFilePath="light";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_blue"))
{
strStyleFilePath="blue";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_green"))
{
strStyleFilePath="green";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_red"))
{
strStyleFilePath="red";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_yellow"))
{
strStyleFilePath="yellow";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_3d"))
{
strStyleFilePath="Office3D";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_coolblue"))
{
strStyleFilePath="CoolBlue";
strImgFilePath="standard";
}
else if(strStyleName.equalsIgnoreCase("s_mx"))
{
strStyleFilePath="mx";
strImgFilePath="standard";
}
else
{
strStyleFilePath="CoolBlue";
strImgFilePath="standard";
strStyleName = "s_coolblue";
}
%>
<html>
<head>
<title>WebEditor在线文本编辑器</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/<%=strStyleFilePath%>/Editor.css" type="text/css" rel="stylesheet">
<Script Language=Javascript>
var sPath = document.location.pathname;
sPath = sPath.substr(0, sPath.length-13);
var sLinkFieldName = "<%=strContentID%>";
var sLinkOriginalFileName = "" ;
var sLinkSaveFileName = "" ;
var sLinkSavePathFileName = "" ;
// 全局设置对象
var config = new Object();
config.Version = "1.5.098" ;
config.ReleaseDate = "2004-09-15" ;
config.StyleName = "<%=strStyleName%>";
config.StyleEditorHeader = "<head><link href=\""+sPath+"css/<%=strStyleFilePath%>/EditorArea.css\" type=\"text/css\" rel=\"stylesheet\"></head><body MONOSPACE>" ;
config.StyleMenuHeader = "<head><link href=\""+sPath+"css/<%=strStyleFilePath%>/MenuArea.css\" type=\"text/css\" rel=\"stylesheet\"></head><body scroll=\"no\" onConTextMenu=\"event.returnValue=false;\">";
config.StyleDir = "<%=strImgFilePath%>";
config.StyleUploadDir = "";
config.InitMode = "EDIT";
config.AutoDetectPasteFromWord = true;
config.BaseUrl = "1";
config.BaseHref = "";
config.AutoRemote = "1";
config.ShowBorder = "0";
var sBaseHref = "";
if(config.BaseHref!=""){
sBaseHref = "<base href=\"" + document.location.protocol + "//" + document.location.host + config.BaseHref + "\">";
}
</Script>
<Script Language=Javascript src="Include/Editor.js"></Script>
<Script Language=Javascript src="Include/table.js"></Script>
<Script Language=Javascript src="Include/menu.js"></Script>
<script language="javascript" event="onerror(msg, url, line)" for="window">
//return true ; // 隐藏错误
alert("页面" + url + "的第" + line + "行出现以下错误:\n" + msg);
</script>
</head>
<body SCROLLING=no onConTextMenu="event.returnValue=false;" onfocus="VerifyFocus()">
<table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'>
<tr><td>
<%
if(!strIsFullScreen.equalsIgnoreCase("1")&&strToolBar.equalsIgnoreCase("mini"))
{
%>
<table border=0 cellpadding=0 cellspacing=0 width='100%' class='Toolbar' id='WebEditor_Toolbar'><tr><td><div class=yToolbar><DIV CLASS="TBHandle"></DIV>
<SELECT CLASS="TBGen" onchange="format('FormatBlock',this[this.selectedIndex].value);this.selectedIndex=0"><option selected>段落样式</option>
<option value="<P>">普通</option>
<option value="<H1>">标题一</option>
<option value="<H2>">标题二</option>
<option value="<H3>">标题三</option>
<option value="<H4>">标题四</option>
<option value="<H5>">标题五</option>
<option value="<H6>">标题六</option>
<option value="<p>">段落</option>
<option value="<dd>">定义</option>
<option value="<dt>">术语定义</option>
<option value="<dir>">目录列表</option>
<option value="<menu>">菜单列表</option>
<option value="<PRE>">已编排格式</option></SELECT>
<SELECT CLASS="TBGen" onchange="format('fontname',this[this.selectedIndex].value);this.selectedIndex=0"><option selected>字体</option>
<option value="宋体">宋体</option>
<option value="黑体">黑体</option>
<option value="楷体_GB2312">楷体</option>
<option value="仿宋_GB2312">仿宋</option>
<option value="隶书">隶书</option>
<option value="幼圆">幼圆</option>
<option value="Arial">Arial</option>
<option value="Arial Black">Arial Black</option>
<option value="Arial Narrow">Arial Narrow</option>
<option value="Brush Script MT">Brush Script MT</option>
<option value="Century Gothic">Century Gothic</option>
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Courier">Courier</option>
<option value="Courier New">Courier New</option>
<option value="MS Sans Serif">MS Sans Serif</option>
<option value="Script">Script</option>
<option value="System">System</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Verdana">Verdana</option>
<option value="Wide Latin">Wide Latin</option>
<option value="Wingdings">Wingdings</option></SELECT><SELECT CLASS="TBGen" onchange="format('fontsize',this[this.selectedIndex].value);this.selectedIndex=0"><option selected>字号</option>
<option value="7">一号</option>
<option value="6">二号</option>
<option value="5">三号</option>
<option value="4">四号</option>
<option value="3">五号</option>
<option value="2">六号</option>
<option value="1">七号</option></SELECT><SELECT CLASS="TBGen" onchange="doZoom(this[this.selectedIndex].value)"><option value="10">10%</option>
<option value="25">25%</option>
<option value="50">50%</option>
<option value="75">75%</option>
<option value="100" selected>100%</option>
<option value="150">150%</option>
<option value="200">200%</option>
<option value="500">500%</option></SELECT><DIV CLASS="TBSep"></DIV>
<DIV CLASS="Btn" TITLE="编辑菜单" onclick="showToolMenu('edit')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/editmenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="字体菜单" onclick="showToolMenu('font')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/fontmenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="段落菜单" onclick="showToolMenu('paragraph')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/paragraphmenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="组件菜单" onclick="showToolMenu('component')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/componentmenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="对象效果菜单" onclick="showToolMenu('object')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/objectmenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="工具菜单" onclick="showToolMenu('tool')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/toolmenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="表单菜单" onclick="showToolMenu('form')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/formmenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="表格菜单" onclick="showToolMenu('table')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/tablemenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="文件视图菜单" onclick="showToolMenu('file')"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/filemenu.gif"></DIV>
<DIV CLASS="Btn" TITLE="全屏编辑" onclick="Maximize()"><IMG CLASS="Ico" SRC="ButtonImage/<%=strImgFilePath%>/maximize.gif"></DIV>
</DIV>
</td></tr></table>
<%
}
else if(strToolBar.equalsIgnoreCase("full"))
{
%>
<table border=0 cellpadding=0 cellspacing=0 width='100%' class='Toolbar' id='WebEditor_Toolbar'><tr><td><div class=yToolbar><DIV CLASS="TBHandle"></DIV>
<SELECT CLASS="TBGen" onchange="format('FormatBlock',this[this.selectedIndex].value);this.selectedIndex=0"><option selected>段落样式</option>
<option value="<P>">普通</option>
<option value="<H1>">标题一</option>
<option value="<H2>">标题二</option>
<option value="<H3>">标题三</option>
<option value="<H4>">标题四</option>
<option value="<H5>">标题五</option>
<option value="<H6>">标题六</option>
<option value="<p>">段落</option>
<option value="<dd>">定义</option>
<option value="<dt>">术语定义</option>
<option value="<dir>">目录列表</option>
<option value="<menu>">菜单列表</option>
<option value="<PRE>">已编排格式</option></SELECT><SELECT CLASS="TBGen" onchange="format('fontname',this[this.selectedIndex].value);this.selectedIndex=0"><option selected>字体</option>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -