📄 xln_edit.js
字号:
//Function XLN_表格
function fortable()
{
var arr = showModalDialog("xln_img/table.html", "", "dialogWidth:25em; dialogHeight:12em; status:0");
if (arr != null){
var tmp=arr.split("*");
row=tmp[0];
col=tmp[1];
var string;
string="<table style='WIDTH: "+tmp[2]+"px;' border="+tmp[3]+" bgcolor="+tmp[6]+" cellspacing="+tmp[5]+" cellpadding="+tmp[4]+">";
for(i=1;i<=row;i++){
string=string+"<tr>";
for(j=1;j<=col;j++){
string=string+"<td> </td>";
}
string=string+"</tr>";
}
string=string+"</table>";
content=message.document.body.innerHTML;
content=content+string;
message.document.body.innerHTML=content;
}
else message.focus();
}
//Function XLN_FLASH
function swf()
{
var arr = showModalDialog("xln_img/flash.html", "", "dialogWidth:28em; dialogHeight:9em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
path=ss[0];
row=ss[1];
col=ss[2];
var string;
string="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width="+row+" height="+col+"><param name=movie value="+path+"><param name=quality value=high><embed src="+path+" pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width="+row+" height="+col+"></embed></object>"
content=message.document.body.innerHTML;
content=content+string;
message.document.body.innerHTML=content;
}
else message.focus();
}
//Function XLN_IMAGES
function pic()
{
var arr = showModalDialog("xln_img/pic.html", "", "dialogWidth:30em; dialogHeight:14em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
e=ss[4];
f=ss[5];
g=ss[6];
h=ss[7];
i=ss[8];
var str1;
str1="<img src='"+a+"' alt='"+b+"'"
if(d.value!='')str1=str1+"width='"+d+"'"
if(e.value!='')str1=str1+"height='"+e+"' "
str1=str1+" border='"+i+"' align='"+h+"' vspace='"+f+"' hspace='"+g+"' style='"+c+"'"
str1=str1+">"
content=message.document.body.innerHTML;
content=content+str1;
message.document.body.innerHTML=content;
}
else message.focus();
}
//Function XLN_栏目框
function FIELDSET()
{
var arr = showModalDialog("xln_img/fieldset.htm", "", "dialogWidth:25em; dialogHeight:10em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
var str1;
str1="<FIELDSET "
str1=str1+"align="+a+""
str1=str1+" style='"
if(c.value!='')str1=str1+"color:"+c+";"
if(d.value!='')str1=str1+"background-color:"+d+";"
str1=str1+"'><Legend"
str1=str1+" align="+b+""
str1=str1+">标题</Legend>内容</FIELDSET>"
content=message.document.body.innerHTML;
content=content+str1;
message.document.body.innerHTML=content;
}
else message.focus();
}
//Function XLN_水平线
function hr()
{
var arr = showModalDialog("xln_img/hr.htm", "", "dialogWidth:30em; dialogHeight:10em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
e=ss[4];
var str1;
str1="<hr"
str1=str1+" color='"+a+"'"
str1=str1+" size="+b+"'"
str1=str1+" "+c+""
str1=str1+" align="+d+""
str1=str1+" width="+e
str1=str1+">"
content=message.document.body.innerHTML;
content=content+str1;
message.document.body.innerHTML=content;
}
else message.focus();
}
//Function XLN_文字
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
//Function XLN_源码
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode) {
cleanHtml();
cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
} else {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
message.focus();
}
//Function XLN_CLEAN_HTML
function cleanHtml()
{
var fonts = message.document.body.all.tags("FONT");
var curr;
for (var i = fonts.length - 1; i >= 0; i--) {
curr = fonts[i];
if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
}
}
//Function XLN_?
function help()
{
var arr = showModalDialog("xln_img/about.htm", "", "dialogWidth:26em; dialogHeight:14em; status:0;help:0");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -