📄 main.js
字号:
var sEditorRootPath = document.location.pathname;
sEditorRootPath = sEditorRootPath.substr(0, sEditorRootPath.length-15);
config.StyleMenuHeader = "<head>"
+"<link href='" + sEditorRootPath + "/language/" + AvailableLangs["Active"] + ".css' type='text/css' rel='stylesheet'>"
+"<link href='" + sEditorRootPath + "/css/" + config.CssDir + "/menuarea.css' type='text/css' rel='stylesheet'>"
+"</head>"
+"<body scroll='no' onConTextMenu='event.returnValue=false;'>";
var sBaseHref = "";
if(config.BaseHref!=""){
sBaseHref = "<base href='" + document.location.protocol + "//" + document.location.host + config.BaseHref + "'>";
}
config.StyleEditorHeader1 = "<head>"
+"<link href='" + sEditorRootPath + "/language/" + AvailableLangs["Active"] + ".css' type='text/css' rel='stylesheet'>"
+"<link href='" + sEditorRootPath + "/css/" + config.CssDir + "/editorarea.css' type='text/css' rel='stylesheet'>";
config.StyleEditorHeader2 = sBaseHref + "</head><body MONOSPACE>";
if (sExtCSS){
sExtCSS = "<link href='" + relative2fullpath(sExtCSS) + "' type='text/css' rel='stylesheet'>";
}else{
sExtCSS = "";
}
document.write ("<title>eWebEditor</title>");
document.write ("<link href='language/" + AvailableLangs["Active"] + ".css' type='text/css' rel='stylesheet'>");
document.write ("<link href='css/" + config.CssDir + "/editor.css' type='text/css' rel='stylesheet'>");
document.write ("<script type='text/javascript' src='js/editor.js'><\/script>");
document.write ("<script type='text/javascript' src='js/table.js'><\/script>");
document.write ("<script type='text/javascript' src='js/menu.js'><\/script>");
document.write ("</head>");
document.write ("<body onfocusin=\"try{eWebEditor.focus();}catch(e){};\" SCROLLING=no ondragstart=\"return false;\" onselectstart=\"return false;\" oncontextmenu=\"return false;\">");
document.write ("<script type='text/javascript' src='js/show.js'><\/script>");
document.write ("</body></html>");
function relative2fullpath(url){
var sPath = sEditorRootPath;
while(url.substr(0,3)=="../"){
url = url.substr(3);
sPath = sPath.substring(0, sPath.lastIndexOf("/"));
}
return sPath + "/" + url;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -