📄 edit.js
字号:
function Editor(content){
oEditor = document.wrEditor;
var strHtml = '<html><hand><script>function killErrors(){return true;}window.onerror = killErrors;</script><style>body,a,table,div,span,td,th,input,select{font-size:9pt;font-family:"宋体,Verdana,Arial";Color:#000000;}body{margin:5;background-color:#FFFFFF;SCROLLBAR-BASE-COLOR:#EFEFEF}table,td{border:1px #709FCB dashed}span,div,li,ul{border:1px #FF00FF dashed}a{color:#0000FF; font-size:14px;}</style></hand><body>'+content+'</body></html>';
oEditor.document.open();
oEditor.document.write(strHtml);
oEditor.document.body.innerHTML;
oEditor.document.close();
oEditor.document.designMode="off";
}
function iframe_s(){
Editor(document.form1.content.value)
}
function GetEditor(TextBox){
oEditor = document.wrEditor;
TextBox.value = oEditor.document.body.innerHTML;
}
function check(){
oLinkField.value = getContent();
}
oLinkField.form.onsubmit=check;
//在当前位置插入文字
function InsertHTML(html){
HtmlEdit.focus();
rng=HtmlEdit.document.selection.createRange();
rng.text=html;
HtmlEdit.focus();
}
//在选取内容前后添加内容
function Insert(h,b){
var sText=HtmlEdit.document.selection.createRange();
InsertHTML(h + sText.text + b)
}
// 显示无模式对话框
function ShowDialog(url, width, height, optValidate) {
if (optValidate) {
if (!validateMode()) return;
}
HtmlEdit.focus();
var arr = showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:no;status:no");
HtmlEdit.focus();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -