📄 index.jsp
字号:
window.attachEvent("onload", initEditor);
// Initialise the tEdit var
var tEdit = null;
</script>
<script language="JavaScript" src="rte_lang.js"></script>
</head>
<body leftMargin="0" topMargin="0" scroll="no" unselectable="on"
onload="tEdit = new tableEditor('doc', 'textedit');"
onMouseMove="if (tEdit) { tEdit.changePos(); tEdit.resizeCell() }" >
<!-- Loading Layer ----------------------------------->
<div id="loading" style="position: absolute; top: 0px; left: 0px; height: 100%; z-index: 2">
<table width="100%" height="100%"><tr><td align="center" valign="middle">
<font size="+3">超文本编辑器需要 IE 6.0以上版本<br><br>载入中,请稍候……</font>
</td></tr></table>
</div>
<!-- Editor Layer -------------------------------------->
<table id="editor" unselectable="on" height="100%" cellspacing="0" cellpadding="0" width="100%" bgcolor="buttonface" border="0">
<tr ondragstart="handleDrag(0)" onmouseup="press(false)" onmousedown="press(true)" onmouseover="hover(true)" onmouseout="hover(false)">
<td class="rebar"><nobr><span class="toolbar">
<img class="spacer" src="images/spacer.gif" width="2"><span class="start"></span>
<img id="btnCut" onclick="doStyle('Cut')" alt="@{Cut}" src="images/icon_cut.gif" align="absMiddle" width="20" height="20">
<img id="btnCopy" onclick="doStyle('Copy')" alt="@{Copy}" src="images/icon_copy.gif" align="absMiddle" width="20" height="20">
<img id="btnPaste" onclick="doStyle('Paste')" alt="@{Paste}" src="images/icon_paste.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnSelect" onclick="doStyle('SelectAll')" alt="@{SelectAll}" src="images/icon_select_all.gif" align="absMiddle" width="20" height="20">
<img id="btnRemove" onclick="doStyle('RemoveFormat')" alt="@{RemoveFormatting}" src="images/icon_rem_formatting.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnLink" onclick="link(true)" alt="@{InsertLink}" src="images/icon_ins_link.gif" align="absMiddle" width="20" height="20">
<img id="btnRemLink" onclick="link(false)" alt="@{RemoveLink}" src="images/icon_rem_link.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnImage" onclick="insert('image')" alt="@{InsertImage}" src="images/icon_ins_image.gif" align="absMiddle" width="20" height="20">
<img id="btnTable" onclick="insert('table')" alt="@{InsertTable}" src="images/icon_ins_table.gif" align="absMiddle" width="20" height="20">
<img id="btnTable" onclick="document.getElementById('tblCtrl').style.visibility = 'visible';" alt="@{EditTable}" src="images/icon_edt_table.gif" align="absMiddle" width="20" height="20">
<img id="btnRule" onclick="doStyle('InsertHorizontalRule')" alt="@{InsertLine}" src="images/icon_rule.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnText" onclick="pickColor('ForeColor')" alt="@{TextColor}" src="images/icon_color_text.gif" align="absMiddle" width="36" height="20">
<img id="btnFill" onclick="pickColor('BackColor')" alt="@{BackgroundColor}" src="images/icon_color_fill.gif" align="absMiddle" width="36" height="20">
<object id="color" data="<%=strSkinBase%>/super/model/rte/colorchooser.html" type="text/x-scriptlet" VIEWASTEXT></object>
<script for="color" event="onscriptletevent(name, data)">
setColor(name, data);
</script>
<img id="btnModel" onclick="LoadModel()" alt="模版" src="images/model.gif" align="absMiddle" width="40" height="20" style="display:">
<img id="btnAbout" onclick="insert('about')" alt="@{About}" src="images/icon_about.gif" align="absMiddle" width="16" height="16">
</span></nobr></td></tr>
<tr ondragstart="handleDrag(0)" onmouseup="press(false)" onmousedown="press(true)" onmouseover="hover(true)" onmouseout="hover(false)">
<td class="rebar"><nobr><span class="toolbar">
<img class="spacer" src="images/spacer.gif" width="2"><span class="start"></span>
<img id="btnBold" onclick="doStyle('bold')" alt="@{Bold}" src="images/icon_bold.gif" align="absMiddle" width="20" height="20">
<img id="btnItalic" onclick="doStyle('italic')" alt="@{Italic}" src="images/icon_italic.gif" align="absMiddle" width="20" height="20">
<img id="btnUnderline" onclick="doStyle('underline')" alt="@{Underline}" src="images/icon_underline.gif" align="absMiddle" width="20" height="20">
<img id="btnStrikethrough" onclick="doStyle('strikethrough')" alt="@{Strikethrough}" src="images/icon_strikethrough.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnLeftJustify" onclick="doStyle('JustifyLeft')" alt="@{AlignLeft}" src="images/icon_left.gif" align="absMiddle" width="20" height="20">
<img id="btnCenter" onclick="doStyle('JustifyCenter')" alt="@{Center}" src="images/icon_center.gif" align="absMiddle" width="20" height="20">
<img id="btnRightJustify" onclick="doStyle('JustifyRight')" alt="@{AlignRight}" src="images/icon_right.gif" align="absMiddle" width="20" height="20">
<img id="btnFullJustify" onclick="doStyle('JustifyFull')" alt="@{AlignBlock}" src="images/icon_block.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnNumList" onclick="doStyle('InsertOrderedList')" alt="@{NumberedList}" src="images/icon_numlist.gif" align="absMiddle" width="20" height="20">
<img id="btnBulList" onclick="doStyle('InsertUnorderedList')" alt="@{BulettedList}" src="images/icon_bullist.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnOutdent" onmousedown="doStyle('Outdent')" alt="@{DecreaseIndent}" src="images/icon_outdent.gif" align="absMiddle" width="20" height="20">
<img id="btnIndent" onmousedown="doStyle('Indent')" alt="@{IncreaseIndent}" src="images/icon_indent.gif" align="absMiddle" width="20" height="20">
<span id="featureHistory">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<img id="btnPrev" onmousedown="document.execCommand('Undo')" alt="@{HistoryBack}" src="images/icon_undo.gif" align="absMiddle" width="20" height="20">
<img id="btnNext" onmousedown="document.execCommand('Redo')" alt="@{HistoryForward}" src="images/icon_redo.gif" align="absMiddle" width="20" height="20">
<img class="spacer" src="images/spacer.gif" width="2"><span class="sep"></span>
<span class="label"><label for="switchMode">@{Source}</label></span>
<input title="@{SourceTitle}" class="checkbox" hidefocus type="checkbox" name="switchMode" id="switchMode"
onclick="tEdit.stopCellResize(true); tEdit.unSetTableElements(); setEditMode(switchMode)">
</span>
</span></nobr></td></tr>
<tr id="featureStyleBar" ondragstart="handleDrag(0)" onmouseup="press(false)" onmousedown="press(true)" onmouseover="hover(true)" onmouseout="hover(false)">
<td class="rebar"><nobr><span class="toolbar">
<img class="spacer" src="images/spacer.gif" width="2"><span class="start"></span>
<span id="featureStyle">
<span class="label">@{Style}</span>
<select name="" id="ctlStyle" class="button" onchange="addTag(this)">
</select>
<span class="sep"></span>
</span>
<span id="featureFont">
<span class="label">@{Font}</span>
<select hidefocus class="fontselect" id="ctlFont" onchange="sel(this)">
<option id="宋体" value="宋体" selected>宋体</option>
<option id="方正舒体" value="方正舒体">方正舒体</option>
<option id="方正姚体" value="方正姚体">方正姚体</option>
<option id="仿宋_GB2312" value="仿宋_GB2312">仿宋_GB2312</option>
<option id="黑体" value="黑体">黑体</option>
<option id="华文彩云" value="华文彩云">华文彩云</option>
<option id="华文仿宋" value="华文仿宋">华文仿宋</option>
<option id="华文细黑" value="华文细黑">华文细黑</option>
<option id="华文新魏" value="华文新魏">华文新魏</option>
<option id="华文行楷" value="华文行楷">华文行楷</option>
<option id="华文中宋" value="华文中宋">华文中宋</option>
<option id="楷体_GB2312" value="楷体_GB2312">楷体_GB2312</option>
<option id="隶书" value="隶书">隶书</option>
<option id="仿宋体" value="仿宋体">仿宋体</option>
<option id="幼圆" value="幼圆">幼圆</option>
<option id="Arial" value="Arial">Arial</option>
<option id="Arial black" value="Arial black">Arial black</option>
<option id="Arial narrow" value="Arial narrow">Arial narrow</option>
<option id="Fixedsys" value="Fixedsys">Fixedsys</option>
<option id="Times New Roman" value="Times New Roman">Times New Roman</option>
<option id="Courier New" value="Courier New">Courier New</option>
<option id="Georgia" value="Georgia">Georgia</option>
<option id="Verdana" value="Verdana">Verdana</option>
<option id="Geneva" value="Geneva">Geneva</option>
</select>
</span>
<span id="featureFontSize">
<span class="sep"></span>
<span class="label">@{Size}</span>
<select hidefocus class="button" id="ctlSize" onchange="sel(this)">
<option selected></option>
<option value="1">1 (8 磅)</option>
<option value="2">2 (10 磅)</option>
<option value="3">3 (12 磅)</option>
<option value="4">4 (14 磅)</option>
<option value="5">5 (18 磅)</option>
<option value="6">6 (24 磅)</option>
<option value="7">7 (36 磅)</option>
</select>
</span>
</span></nobr></td>
</tr>
<!-- Fields are inserted here -->
<tr id="rebarBottom">
<td class="spacer" height="2"><img height="1" src="images/spacer.gif" align="left"></td></tr>
<tr>
<td class="textedit" id="textedit" valign="top" height="100%">
<div class="document" id="doc" onkeyup="reset(); markSelectedElement(); tEdit.setTableElements(); tEdit.repositionArrows();" contenteditable="false" style="OVERFLOW: auto; WIDTH: 100%; HEIGHT: 100%" onclick="reset(); markSelectedElement()" onmouseup="markSelectedElement(); tEdit.setTableElements(); tEdit.stopCellResize(false);" onscroll="tEdit.repositionArrows()" height="100%" width="100%">
</div>
</td></tr>
</table>
<input type="hidden" value="" name="IMG_MODULE">
<input type="hidden" value="" name="IMG_YM">
<input type="hidden" value="" name="IMG_ATTACHMENT_ID">
<input type="hidden" value="" name="IMG_ATTACHMENT_NAME">
<!-- Table Editing Layer ----------------------------------->
<div id="tblCtrl" style="position:absolute; visibility:hidden; left:200; top:200; z-index: 5">
<table border="0" cellpadding="0" cellspacing="0" width="68" bgcolor="buttonface">
<tr ondragstart="handleDrag(0)">
<td><img src="images/spacer.gif" width="8" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="5" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="18" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="2" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="22" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="4" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="9" height="1" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="2" onClick="document.getElementById('tblCtrl').style.visibility = 'hidden';"><img name="CloseWindow" src="images/CloseWindow.gif" width="13" height="16" border="0"></td>
<td colspan="3" onmousedown="tEdit.setDrag( document.getElementById('tblCtrl') )" onmouseup="tEdit.setDrag( document.getElementById('tblCtrl') )"><img name="toolbar" src="images/toolbar.gif" width="42" height="16" border="0"></td>
<td colspan="2"><img name="minimize" src="images/minimize.gif" width="13" height="16" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="16" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="7"><img name="hdr_tables" src="images/hdr_tables.gif" width="68" height="15" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="15" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="7"><img name="plt_hdr" src="images/plt_hdr.gif" width="68" height="9" border="0"></td>
<td><img src="images/spacer.gif" width="1" height="9" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)" onmouseup="press(false)" onmousedown="press(true)" onmouseover="hover(true)" onmouseout="hover(false)">
<td rowspan="8"><img class="spacer" name="Editor_r4_c1" src="images/Editor_r4_c1.gif" width="8" height="112" border="0"></td>
<td colspan="2" class="tbl"><img name="rmv_colspan" onclick="tEdit.splitCell();" src="images/rmv_colspan.gif" width="21" height="24" alt="@{RemoveColspan}"></td>
<td rowspan="8"><img class="spacer" name="Editor_r4_c4" src="images/Editor_r4_c4.gif" width="2" height="112" border="0"></td>
<td colspan="2" class="tbl"><img name="rmv_rowspan" onclick="tEdit.unMergeDown();" src="images/rmv_rowspan.gif" width="24" height="24" alt="@{RemoveRowspan}"></td>
<td rowspan="8"><img class="spacer" name="Editor_r4_c7" src="images/Editor_r4_c7.gif" width="9" height="112" border="0"></td>
<td><img class="spacer" src="images/spacer.gif" width="1" height="26" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="2"><img class="spacer" name="Editor_r5_c2" src="images/Editor_r5_c2.gif" width="23" height="2" border="0"></td>
<td colspan="2"><img class="spacer" name="Editor_r5_c5" src="images/Editor_r5_c5.gif" width="26" height="2" border="0"></td>
<td><img class="spacer" src="images/spacer.gif" width="1" height="2" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)" onmouseup="press(false)" onmousedown="press(true)" onmouseover="hover(true)" onmouseout="hover(false)">
<td colspan="2" class="tbl"><img name="incr_colspan" onclick="tEdit.mergeRight();" src="images/incr_colspan.gif" width="21" height="24" alt="@{IncreaseColspan}" border="0"></td>
<td colspan="2" class="tbl"><img name="incr_rowspan" onclick="tEdit.mergeDown();" src="images/incr_rowspan.gif" width="24" height="24" alt="@{IncreaseRowspan}" border="0"></td>
<td><img class="spacer" src="images/spacer.gif" width="1" height="26" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="2"><img class="spacer" name="Editor_r7_c2" src="images/Editor_r7_c2.gif" width="23" height="2" border="0"></td>
<td colspan="2"><img class="spacer" name="Editor_r7_c5" src="images/Editor_r7_c5.gif" width="26" height="2" border="0"></td>
<td><img class="spacer" src="images/spacer.gif" width="1" height="2" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)" onmouseup="press(false)" onmousedown="press(true)" onmouseover="hover(true)" onmouseout="hover(false)">
<td colspan="2" class="tbl"><img name="add_col" onclick="tEdit.processColumn('add');" src="images/add_col.gif" width="21" height="22" alt="@{AddColumn}" border="0" ></td>
<td colspan="2" class="tbl"><img name="add_row" onclick="tEdit.processRow('add');" src="images/add_row.gif" width="24" height="22" alt="@{AddRow}" border="0" ></td>
<td><img src="images/spacer.gif" width="1" height="24" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="2"><img class="spacer" name="Editor_r9_c2" src="images/Editor_r9_c2.gif" width="23" height="4" border="0"></td>
<td colspan="2"><img class="spacer" name="Editor_r9_c5" src="images/Editor_r9_c5.gif" width="26" height="4" border="0"></td>
<td><img class="spacer" src="images/spacer.gif" width="1" height="4" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)" onmouseup="press(false)" onmousedown="press(true)" onmouseover="hover(true)" onmouseout="hover(false)">
<td colspan="2" class="tbl"><img name="rmv_col" onclick="tEdit.processColumn('remove');" src="images/rmv_col.gif" width="21" height="22" alt="@{RemoveColumn}" border="0" ></td>
<td colspan="2" class="tbl"><img name="rmv_row" onclick="tEdit.processRow('remove');" src="images/rmv_row.gif" width="24" height="22" alt="@{RemoveRow}" border="0" ></td>
<td><img src="images/spacer.gif" width="1" height="24" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="2"><img name="Editor_r11_c2" src="images/Editor_r11_c2.gif" width="23" height="4" border="0"></td>
<td colspan="2"><img name="Editor_r11_c5" src="images/Editor_r11_c5.gif" width="26" height="4" border="0"></td>
<td><img class="spacer" src="images/spacer.gif" width="1" height="4" border="0"></td>
</tr>
<tr ondragstart="handleDrag(0)">
<td colspan="7"><img name="plt_ftr" src="images/plt_ftr.gif" width="68" height="8" border="0"></td>
<td><img class="spacer" src="images/spacer.gif" width="1" height="8" border="0"></td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -