📄 ftbbspost.js
字号:
document.writeln("<table width=100% height=100% cellpadding=2 cellspacing=0 bgcolor=#eeeeee><tr class=\"maintbtr1\"><td align=left><select style=\"width:55px\" onChange=\"FormatText('FormatBlock',this[this.selectedIndex].value);\"><option selected>段落</option><option value=\"<P>\">正文</option><option value=\"<H1>\">标题一</option><option value=\"<H2>\">标题二</option><option value=\"<H3>\">标题三</option><option value=\"<H4>\">标题四</option><option value=\"<H5>\">标题五</option><option value=\"<H6>\">标题六</option><option value=\"<PRE>\">预设格式</option></select> <select style=\"width:110px\" name=\"selectFont\" onChange=\"FormatText('fontname', selectFont.options[selectFont.selectedIndex].value);\"><option selected>字体<option value=\"removeFormat\">默认字体<option value=\"宋体\">宋体<option value=\"黑体\">黑体<option value=\"隶书\">隶书<option value=\"幼圆\">幼圆<option value=\"楷体_GB2312\">楷体<option value=\"仿宋_GB2312\">仿宋<option value=\"新宋体\">新宋体<option value=\"华文彩云\">华文彩云<option value=\"华文仿宋\">华文仿宋<option value=\"华文新魏\">华文新魏<option value=\"Arial\">Arial<option value=\"Arial Black\">Arial Black<option value=\"Arial Narrow\">Arial Narrow<option value=\"Century\">Century<option value=\"Courier New\">Courier New<option value=\"Georgia\">Georgia<option value=\"Impact\">Impact<option value=\"Lucida Console\">Lucida Console<option value=\"MS Sans Serif\">MS Sans Serif<option value=\"System\">System<option value=\"Symbol\">Symbol<option value=\"Tahoma\">Tahoma<option value=\"Times New Roman\">Times New Roman <option value=\"Verdana\">Verdana<option value=\"Webdings\">Webdings<option value=\"Wingdings\">Wingdings</option></select> <select onChange=\"FormatText('fontsize',this[this.selectedIndex].value);\" name=\"D2\"><option class=\"heading\" selected>字体大小<option value=1>一号<option value=2>二号<option value=3>三号<option value=4>四号<option value=5>五号<option value=6>六号<option value=7>七号</option></select>");
document.writeln("<img src=../htmledit/wbTextBox/images/fbcolor.gif alt=\"突出颜色\" align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onClick=BackColor()>");
document.writeln("<img src=../htmledit/wbTextBox/images/fgcolor.gif alt=\"字体颜色\" align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onClick=foreColor()>");
document.writeln("<img src=../htmledit/wbTextBox/images/replace.gif alt=\"替换\" align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onClick=replace()>");
document.writeln("<img src=../htmledit/wbTextBox/images/img.gif alt=\"插入图片\" align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onClick=img()>");
document.writeln("<img alt=\"插入FLASH文件\" src=../htmledit/wbTextBox/images/swf.gif align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=flash()>");
document.writeln("<img alt=\"插入Media Player文件\" src=../htmledit/wbTextBox/images/wmv.gif align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=MediaPlayer()>");
document.writeln("<img alt=\"插入RealPlayer文件\" src=../htmledit/wbTextBox/images/rm.gif align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=RealPlay()>");
//document.writeln("<img alt=\"插入表情\" src=../htmledit/wbTextBox/images/qq.gif align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=qq()>");
document.writeln("<img alt=\"插入表格\" src=../htmledit/wbTextBox/images/table.gif align=absmiddle style=cursor:hand onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=WBTB_fortable()>");
document.writeln("<img alt=\"插入表情\" src=../htmledit/wbTextBox/images/em.gif align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=em()>");
document.writeln("<img alt=\"HTML编辑\" src=../htmledit/wbTextBox/images/ftbbshtml.gif align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=html()><br>");
var FormatTextlist="全选 selectAll|取消选择 unselect|剪切 cut|复制 copy|粘贴 paste|删除当前选中区 delete|插入超链接 createLink|去掉超链接 unlink|粗体 bold|倾斜 italic|下划线 underline|上标 superscript|下标 subscript|删除线 strikethrough|删除文字格式 removeFormat|左对齐 Justifyleft|居中 JustifyCenter|右对齐 JustifyRight|两端对齐 justifyfull|编号 insertorderedlist|项目符号 InsertUnorderedList|减少缩进量 outdent|增加缩进量 indent|撤消 undo|恢复 redo"
var list= FormatTextlist.split ('|');
for(i=0;i<list.length;i++) {
if (list[i]=="<br>"){document.write("<br>");
}else{
var TextName= list[i].split (' ');
document.write(" <img align=absmiddle src=../htmledit/wbTextBox/images/"+TextName[1]+".gif alt="+TextName[0]+" style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onClick=FormatText('"+TextName[1]+"')> ");
}
}
document.writeln("<img alt=\"清理代码\" src=../htmledit/wbTextBox/images/cleancode.gif align=absmiddle style=cursor:hand align=center onmouseover=\"this.style.borderWidth='1pt';this.style.borderColor='#000000';this.style.borderStyle='solid'\" style=\"BORDER-RIGHT: white 1pt solid; BORDER-TOP: white 1pt solid; BORDER-LEFT: white 1pt solid; BORDER-BOTTOM: white 1pt solid\" onmouseout=\"this.style.borderWidth='1pt';this.style.borderColor='white';\" onclick=CleanCode()>");
document.writeln("</td></tr><tr><td height=200%><iframe ID=HtmlEditor MARGINHEIGHT=5 MARGINWIDTH=5 width=100% height=100%></iframe></td></tr><tr></tr></table>");
if (document.all){var IframeID=frames["HtmlEditor"];}else{var IframeID=document.getElementById("HtmlEditor").contentWindow;}
if (navigator.appVersion.indexOf("MSIE 6.0",0)==-1){IframeID.document.designMode="On"}
IframeID.document.open();
IframeID.document.write ('<script>i=0;function ctlent(eventobject){if(event.ctrlKey && window.event.keyCode==13 && i==0){i=1;parent.document.myform.menu.value=document.body.innerHTML;parent.document.myform.submit();parent.document.myform.B1.disabled=true;}}<\/script><body onkeydown=ctlent()>');
IframeID.document.close();
IframeID.document.body.contentEditable = "True";
IframeID.document.body.innerHTML=document.getElementById("menu").value;
IframeID.document.body.style.fontSize="10pt";
function em(){
var arr = showModalDialog("../htmledit/inc/Emotion.htm", "", "dialogWidth:20em; dialogHeight:11em; status:0;help:0");
if (arr != null){
IframeID.focus()
sel=IframeID.document.selection.createRange();
sel.pasteHTML(arr);
}
}
function CleanCode(){
var body = IframeID.document.body;
var html = IframeID.document.body.innerHTML;
html = html.replace(/\<p>/gi,"[$p]");
html = html.replace(/\<\/p>/gi,"[$\/p]");
html = html.replace(/\<br>/gi,"[$br]");
html = html.replace(/\<[^>]*>/g,"");
html = html.replace(/\[\$p\]/gi,"<p>");
html = html.replace(/\[\$\/p\]/gi,"<\/p>");
html = html.replace(/\[\$br\]/gi,"<br>");
IframeID.document.body.innerHTML = html;
}
function FormatText(command,option){IframeID.focus();IframeID.document.execCommand(command,true,option);}
function CheckLength(){alert("最大字符为 "+5000000+ " 字节\n您的内容已有 "+IframeID.document.body.innerHTML.length+" 字节");}
function emoticon(theSmilie){
IframeID.focus();
sel=IframeID.document.selection.createRange();
sel.pasteHTML("<img src=images/Emotions/"+theSmilie+".gif>");
}
function DoTitle(addTitle) {
var revisedTitle;var currentTitle = document.myform.topic.value;revisedTitle = addTitle+currentTitle;document.myform.topic.value=revisedTitle;document.myform.topic.focus();
}
function CheckForm(form){
if (myform.BoardID_1.value==""){alert("请选择主论坛!");myform.BoardID_1.focus();return false;}
if (myform.BoardID_2.value==""){alert("请选择分论坛!");myform.BoardID_2.focus();return false;}
if (myform.title.value==""){alert("请填写主题!");myform.title.focus();return false;}
if (myform.title.value.length<6){alert("贴子标题最少要6个字!");myform.title.focus();return false;}
if (myform.title.value.length>45){alert("贴子标题最长是45个字!");myform.title.focus();return false;}
form.menu.value=IframeID.document.body.innerHTML;
MessageLength=IframeID.document.body.innerHTML.length;
if(MessageLength<2){alert("文章内容不能小于2个字符!");return false;}
if(MessageLength>5000000){alert("文章内容不能超过5000000个字符!");return false;}
document.myform.B1.disabled = true;
}
function CheckReForm(form){
form.menu.value=IframeID.document.body.innerHTML;
MessageLength=IframeID.document.body.innerHTML.length;
if(MessageLength<2){alert("文章内容不能小于2个字符!");return false;}
if(MessageLength>5000000){alert("文章内容不能超过5000000个字符!");return false;}
document.myform.B1.disabled = true;
}
function CheckPollForm(form){
if (myform.BoardID_1.value==""){alert("请选择主论坛!");myform.BoardID_1.focus();return false;}
if (myform.BoardID_2.value==""){alert("请选择分论坛!");myform.BoardID_2.focus();return false;}
if (myform.title.value==""){alert("请填写主题!");myform.title.focus();return false;}
if (myform.title.value.length<6){alert("贴子标题最少要6个字!");myform.title.focus();return false;}
if (myform.title.value.length>45){alert("贴子标题最长是45个字!");myform.title.focus();return false;}
if (myform.daynum.value==""){alert("有效期不能为空!");myform.daynum.focus();return false;}
if(isNaN(myform.daynum.value)){ alert("输入格式错误:天数只能输入数字.");myform.daynum.focus();myform.daynum.select();return false;}
form.menu.value=IframeID.document.body.innerHTML;
MessageLength=IframeID.document.body.innerHTML.length;
if(MessageLength<2){alert("文章内容不能小于2个字符!");return false;}
if(MessageLength>5000000){alert("文章内容不能超过5000000个字符!");return false;}
document.myform.B1.disabled = true;
}
function Gopreview()
{
document.preview.menu.value=IframeID.document.body.innerHTML;
window.open('', 'preview_page', 'resizable,scrollbars,width=750,height=450');
document.preview.submit()
}
function BackColor()
{
var arr = showModalDialog("../htmledit/inc/selcolor.htm", "", "dialogWidth:18em; dialogHeight:17.5em; status:0;help:0");
if (arr != null) FormatText('BackColor', arr);
else IframeID.focus();
}
function foreColor()
{
var arr = showModalDialog("../htmledit/inc/selcolor.htm", "", "dialogWidth:18em; dialogHeight:17.5em; status:0;help:0");
if (arr != null) FormatText('forecolor', arr);
else IframeID.focus();
}
//////替换内容
function replace()
{
var arr = showModalDialog("../htmledit/inc/replace.html", "", "dialogWidth:22em;dialogHeight:10em;status:0;help:0");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -