📄 menu.js.vm
字号:
case "font": // 字体菜单
sMenu += getFormatMenuRow("bold", "$action.getText('webeditor.js.tools.font.bold')", "bold.gif");
sMenu += getFormatMenuRow("italic", "$action.getText('webeditor.js.tools.font.italic')", "italic.gif");
sMenu += getFormatMenuRow("underline", "$action.getText('webeditor.js.tools.font.underline')", "underline.gif");
sMenu += getFormatMenuRow("strikethrough", "$action.getText('webeditor.js.tools.font.strikethrough')", "strikethrough.gif");
sMenu += sMenuHr;
sMenu += getFormatMenuRow("superscript", "$action.getText('webeditor.js.tools.font.superscript')", "superscript.gif");
sMenu += getFormatMenuRow("subscript", "$action.getText('webeditor.js.tools.font.subscript')", "subscript.gif");
sMenu += sMenuHr;
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForSelcolor.action?action=forecolor', 280, 250, true)", "forecolor.gif", "$action.getText('webeditor.js.tools.font.forecolor')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForSelcolor.action?action=backcolor', 280, 250, true)", "backcolor.gif", "$action.getText('webeditor.js.tools.font.backcolor')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "insert('big')", "tobig.gif", "$action.getText('webeditor.js.tools.font.tobig')");
sMenu += getMenuRow("", "insert('small')", "tosmall.gif", "$action.getText('webeditor.js.tools.font.tosmall')");
height = 206;
break;
case "paragraph": // 段落菜单
sMenu += getFormatMenuRow("JustifyLeft", "$action.getText('webeditor.js.tools.paragraph.justifyleft')", "justifyleft.gif");
sMenu += getFormatMenuRow("JustifyCenter", "$action.getText('webeditor.js.tools.paragraph.justifycenter')", "justifycenter.gif");
sMenu += getFormatMenuRow("JustifyRight", "$action.getText('webeditor.js.tools.paragraph.justifyright')", "justifyright.gif");
sMenu += getFormatMenuRow("JustifyFull", "$action.getText('webeditor.js.tools.paragraph.justifyfull')", "justifyfull.gif");
sMenu += sMenuHr;
sMenu += getFormatMenuRow("insertorderedlist", "$action.getText('webeditor.js.tools.paragraph.insertorderedlist')", "insertorderedlist.gif");
sMenu += getFormatMenuRow("insertunorderedlist", "$action.getText('webeditor.js.tools.paragraph.insertunorderedlist')", "insertunorderedlist.gif");
sMenu += getFormatMenuRow("indent", "$action.getText('webeditor.js.tools.paragraph.indent')", "indent.gif");
sMenu += getFormatMenuRow("outdent", "$action.getText('webeditor.js.tools.paragraph.outdent')", "outdent.gif");
sMenu += sMenuHr;
sMenu += getFormatMenuRow("insertparagraph", "$action.getText('webeditor.js.tools.paragraph.insertparagraph')", "insertparagraph.gif");
sMenu += getMenuRow("", "insert('br')", "br.gif", "$action.getText('webeditor.js.tools.paragraph.br')");
height = 204;
break;
case "edit": // 编辑菜单
var s_Disabled = "";
if (history.data.length <= 1 || history.position <= 0) s_Disabled = "disabled";
sMenu += getMenuRow(s_Disabled, "goHistory(-1)", "undo.gif", "$action.getText('webeditor.js.tools.edit.undo')")
if (history.position >= history.data.length-1 || history.data.length == 0) s_Disabled = "disabled";
sMenu += getMenuRow(s_Disabled, "goHistory(1)", "redo.gif", "$action.getText('webeditor.js.tools.edit.redo')")
sMenu += sMenuHr;
sMenu += getFormatMenuRow("Cut", "$action.getText('webeditor.js.tools.edit.cut')", "cut.gif");
sMenu += getFormatMenuRow("Copy", "$action.getText('webeditor.js.tools.edit.copy')", "copy.gif");
sMenu += getFormatMenuRow("Paste", "$action.getText('webeditor.js.tools.edit.paste')", "paste.gif");
sMenu += getMenuRow("", "PasteText()", "pastetext.gif", "$action.getText('webeditor.js.tools.edit.pastetext')");
sMenu += getMenuRow("", "PasteWord()", "pasteword.gif", "$action.getText('webeditor.js.tools.edit.pasteword')");
sMenu += sMenuHr;
sMenu += getFormatMenuRow("delete", "$action.getText('webeditor.js.tools.edit.delete')", "delete.gif");
sMenu += getFormatMenuRow("RemoveFormat", "$action.getText('webeditor.js.tools.edit.removeformat')", "removeformat.gif");
sMenu += sMenuHr;
sMenu += getFormatMenuRow("SelectAll", "$action.getText('webeditor.js.tools.edit.selectall')", "selectall.gif");
sMenu += getFormatMenuRow("Unselect", "$action.getText('webeditor.js.tools.edit.unselect')", "unselect.gif");
sMenu += sMenuHr;
sMenu += getMenuRow("", "findReplace()", "findreplace.gif", "$action.getText('webeditor.js.tools.edit.findreplace')");
height = 248;
break;
case "object": // 对象效果菜单
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForSelcolor.action?action=bgcolor', 280, 250, true)", "bgcolor.gif", "$action.getText('webeditor.js.tools.object.bgcolor')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForBackimage.action', 350, 210, true)", "bgpic.gif", "$action.getText('webeditor.js.tools.object.bgpic')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "absolutePosition()", "abspos.gif", "$action.getText('webeditor.js.tools.object.abspos')");
sMenu += getMenuRow("", "zIndex('forward')", "forward.gif", "$action.getText('webeditor.js.tools.object.forward')");
sMenu += getMenuRow("", "zIndex('backward')", "backward.gif", "$action.getText('webeditor.js.tools.object.backward')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "showBorders()", "showborders.gif", "$action.getText('webeditor.js.tools.object.showborders')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "insert('quote')", "quote.gif", "$action.getText('webeditor.js.tools.object.quote')");
sMenu += getMenuRow("", "insert('code')", "code.gif", "$action.getText('webeditor.js.tools.object.code')");
height = 166;
break;
case "component": // 组件菜单
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForImg.action', 350, 315, true)", "img.gif", "$action.getText('webeditor.js.tools.component.img')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForFlash.action', 350, 200, true)", "flash.gif", "$action.getText('webeditor.js.tools.component.flash')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForMedia.action', 350, 200, true)", "media.gif", "$action.getText('webeditor.js.tools.component.media')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForFile.action', 350, 150, true)", "file.gif", "$action.getText('webeditor.js.tools.component.file')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForFieldset.action', 350, 170, true)", "fieldset.gif", "$action.getText('webeditor.js.tools.component.fieldset')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForIframe.action', 350, 200, true)", "iframe.gif", "$action.getText('webeditor.js.tools.component.iframe')");
sMenu += getFormatMenuRow("InsertHorizontalRule", "$action.getText('webeditor.js.tools.component.inserthorizontalrule')", "inserthorizontalrule.gif");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForMarquee.action', 395, 150, true)", "marquee.gif", "$action.getText('webeditor.js.tools.component.marquee')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "createLink()", "createlink.gif", "$action.getText('webeditor.js.tools.component.createlink')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForAnchor.action', 270, 220, true)", "anchor.gif", "$action.getText('webeditor.js.tools.component.anchor')");
sMenu += getMenuRow("", "mapEdit()", "map.gif", "$action.getText('webeditor.js.tools.component.map')");
sMenu += getFormatMenuRow("UnLink", "$action.getText('webeditor.js.tools.component.unlink')", "unlink.gif");
height = 266;
break;
case "tool": // 工具菜单
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForSymbol.action', 350, 220, true)", "symbol.gif", "$action.getText('webeditor.js.tools.tool.symbol')");
sMenu += getMenuRow("", "insert('excel')", "excel.gif", "$action.getText('webeditor.js.tools.tool.excel')");
sMenu += getMenuRow("", "ShowDialog('${action.getText('config.webeditor.path.action')}/webeditorDialogForEmot.action', 300, 180, true)", "emot.gif", "$action.getText('webeditor.js.tools.tool.emot')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "insert('nowdate')", "date.gif", "$action.getText('webeditor.js.tools.tool.date')");
sMenu += getMenuRow("", "insert('nowtime')", "time.gif", "$action.getText('webeditor.js.tools.tool.time')");
height = 102;
break;
case "file": // 文件视图菜单
sMenu += getMenuRow("", "format('Refresh')", "refresh.gif", "$action.getText('webeditor.js.tools.file.refresh')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "setMode('CODE')", "modecodebtn.gif", "$action.getText('webeditor.js.tools.file.modecodebtn')");
sMenu += getMenuRow("", "setMode('EDIT')", "modeeditbtn.gif", "$action.getText('webeditor.js.tools.file.modeeditbtn')");
sMenu += getMenuRow("", "setMode('TEXT')", "modetextbtn.gif", "$action.getText('webeditor.js.tools.file.modetextbtn')");
sMenu += getMenuRow("", "setMode('VIEW')", "modeviewbtn.gif", "$action.getText('webeditor.js.tools.file.modeviewbtn')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "sizeChange(150)", "sizeplus.gif", "$action.getText('webeditor.js.tools.file.sizeplus')");
sMenu += getMenuRow("", "sizeChange(-150)", "sizeminus.gif", "$action.getText('webeditor.js.tools.file.sizeminus')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "format('Print')", "print.gif", "$action.getText('webeditor.js.tools.file.print')");
sMenu += sMenuHr;
sMenu += getMenuRow("", "ShowDialog('dialog/help.htm','400','300')", "help.gif", "$action.getText('webeditor.js.tools.file.help')");
height = 228;
break;
case "table": // 表格菜单
sMenu += getTableMenuRow("TableInsert");
sMenu += getTableMenuRow("TableProp");
sMenu += sMenuHr;
sMenu += getTableMenuRow("TableCell");
height = 306;
break;
case "form": // 表单菜单
sMenu += getFormatMenuRow("InsertInputText", "$action.getText('webeditor.js.tools.form.formtext')", "formtext.gif");
sMenu += getFormatMenuRow("InsertTextArea", "$action.getText('webeditor.js.tools.form.formtextarea')", "formtextarea.gif");
sMenu += getFormatMenuRow("InsertInputRadio", "$action.getText('webeditor.js.tools.form.formradio')", "formradio.gif");
sMenu += getFormatMenuRow("InsertInputCheckbox", "$action.getText('webeditor.js.tools.form.formcheckbox')", "formcheckbox.gif");
sMenu += getFormatMenuRow("InsertSelectDropdown", "$action.getText('webeditor.js.tools.form.formdropdown')", "formdropdown.gif");
sMenu += getFormatMenuRow("InsertButton", "$action.getText('webeditor.js.tools.form.formbutton')", "formbutton.gif");
height = 120;
break;
case "zoom": // 缩放菜单
for (var i=0; i<aZoomSize.length; i++){
if (aZoomSize[i]==nCurrZoomSize){
sMenu += getMenuRow("", "doZoom("+aZoomSize[i]+")", "checked.gif", aZoomSize[i]+"%");
}else{
sMenu += getMenuRow("", "doZoom("+aZoomSize[i]+")", "space.gif", aZoomSize[i]+"%");
}
height += 20;
}
break;
}
sMenu = sMenu1 + sMenu + sMenu2;
oPopDocument.open();
oPopDocument.write(config.StyleMenuHeader+sMenu);
oPopDocument.close();
height+=2;
if(lefter+width > document.body.clientWidth) lefter=lefter-width;
//if(topper+height > document.body.clientHeight) topper=topper-height;
oPopupMenu.show(lefter - leftoff - 2, topper - topoff + 22, width, height, document.body);
return false;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -