📄 htmledit.js
字号:
function replace(string,text,by)
{
// from www.irt.org, supposedly..
if (string.length==0 || text.length==0) return string;
var i = string.indexOf(text);
if (((!i) && (text != string.substring(0,text.length))) || (i== -1)) return string;
var newstr = string.substring(0,i) + by;
if (i+text.length < string.length) newstr += replace(string.substring(i+ text.length, string.length), text, by);
return newstr;
}
/*
function c2e(text)
{
text=replace(text,"\r","");
text=replace(text,"\n","<BR>\n");
text = replace(text,"<SCRIPT>","#SCRIPT#");
text = replace(text,"</SC"+"RIPT>","#/SCRIPT#");
text = replace(text,"<BR>\n<UL>","\n<UL>");
text = replace(text,"<UL><BR>","<UL>");
text = replace(text,"</UL><BR>","</UL>");
text = replace(text,"<BR>\n<OL>","\n<OL>");
text = replace(text,"<OL><BR>","<OL>");
text = replace(text,"</OL><BR>","</OL>");
text = replace(text,"<BR>\n<LI>", "\n<LI>");
return text;
}
*/
function e2c(text)
{
// first, kick out some absolute url's
//myloc=document.URL;
//myloc=replace(myloc, "pivot/log.php","");
//text=replace(text, myloc, "");
//text=replace(text, "pivot/log.php","");
//text=replace(text,"<BR>","\n");
//text=replace(text,"<P>","");
//text=replace(text,"</P>","<br>");
text=replace(text,"STRONG>","B>");
text=replace(text,"EM>","I>");
text=replace(text,"/UL>\r\n","/UL>");
text=replace(text,"/OL>\r\n","/OL>");
text=replace(text,"#SCRIPT#","<SCRIPT>");
text=replace(text,"#/SCRIPT#","</SC"+"RIPT>");
text=replace(text,"<A","<A target='_blank'");
return text;
}
/*
function copycontenttoedit(){
text=c2e(document.all.f_introduction.value)+" ";
document.frames['edit'].setHTML(text);
}
*/
function copyedittocontent()
{
text=e2c(document.frames['edit'].getHTML());
document.all.Content.value=text;
}
function setInitHtml()
{
return szInitHTML;
}
function Selface(faceid)
{
document.htmlForm.Face.value=faceid;
document.all.Curface.src="images/manto/"+faceid+".gif";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -