📄 ftb-pro.js
字号:
<td><input type = 'text' id = 'real_width' style = 'width:40px;' onblur = 'updatePreview();' value='550' name='T2' size='20'/></td></tr>\n\
<tr>\n\
<td class = 'f_title'>高度:</td>\n\
<td><input type = 'text' id = 'real_height' style = 'width:40px;' onblur = 'updatePreview();' value='400' name='T3' size='20'/></td></tr>\n\
</table>\n\
</td>\n\
<td>\n\
<table id='table3'>\n\
<tr>\n\
<td class = 'f_title'>对齐方式:</td>\n\
<td>\n\
<select id = 'real_align' style = 'width:70px;' onchange = 'updatePreview();' name='D1'>\n\
<option value = '' selected = '1'>不设置</option>\n\
<option value = 'left'>左</option>\n\
<option value = 'center'>中</option>\n\
<option value = 'right'>右</option>\n\
<option value = 'texttop'>文本上方</option>\n\
<option value = 'AbsMiddle'>正中央</option>\n\
<option value = 'Baseline'>基线</option>\n\
<option value = 'AbsBottom'>正下方</option>\n\
<option value = 'bottom'>下</option>\n\
<option value = 'Middle'>中</option>\n\
<option value = 'Top'>上</option>\n\
</select>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td class = 'f_title'>边框宽度:</td>\n\
<td><input type = 'text' id = 'real_border' style = 'width:70px;' onblur = 'updatePreview();' name='T1' size='20'/></td>\n\
</tr>\n\
</table>\n\
</td>\n\
</tr>\n\
</table>\n\
</fieldset>\n\
</td>\n\
</tr>\n\
</table>\n\
<div class = 'footer'>\n\
<button type = 'button' name = 'updateRealButton' id = 'updateRealButton' onclick = 'updateReal();window.close();'>确定</button>\n\
<button type = 'button' name = 'cancel' id = 'cancelButton' onclick = 'window.close();'>取消</button>\n\
</div>\n\
<script type = 'text/javascript'>\n\
function load()\n\
{\n\
ftb = window.launchParameters['ftb'];\n\
oReal = ftb.GetNearest('real');\n\
src = document.getElementById('real_src');\n\
align = document.getElementById('real_align');\n\
border = document.getElementById('real_border');\n\
hspace = document.getElementById('real_hspace');\n\
vspace = document.getElementById('real_vspace');\n\
width = document.getElementById('real_width');\n\
height = document.getElementById('real_height');\n\
}\n\
</script>\n\
</form>\n\
</body>\n\
</html>\n\
");
var FTB_MediaPopUpHtml = new String("\n\
<html>\n\
<head>\n\
<meta http-equiv = 'Content-Type' content = 'text/html; charset=gb2312'>\n\
<title>Media Editor</title>\n\
<style type = 'text/css'>\n\
html, body\n\
{\n\
background-color: #ECE9D8;\n\
color: #000000;\n\
font: 11px Tahoma,Verdana,sans-serif;\n\
padding: 0px;\n\
}\n\
body\n\
{\n\
margin: 5px;\n\
}\n\
form\n\
{\n\
margin: 0px;\n\
padding: 0px;\n\
}\n\
table\n\
{\n\
font: 11px Tahoma, Verdana, sans-serif;\n\
}\n\
form p\n\
{\n\
margin-top: 5px;\n\
margin-bottom: 5px;\n\
}\n\
h3\n\
{\n\
margin: 0;\n\
margin-top: 4px;\n\
margin-bottom: 5px;\n\
font-size: 12px;\n\
border-bottom: 2px solid #90A8F0;\n\
color: #90A8F0;\n\
}\n\
fieldset\n\
{\n\
padding: 0px 10px 5px 5px;\n\
}\n\
button\n\
{\n\
width: 75px;\n\
}\n\
select, input, button\n\
{\n\
font: 11px Tahoma, Verdana, sans-serif;\n\
}\n\
.f_title\n\
{\n\
text-align: right;\n\
}\n\
.footer\n\
{\n\
border-top: 2px solid #90A8F0;\n\
padding-top: 3px;\n\
margin-top: 4px;\n\
text-align: right;\n\
}\n\
</style>\n\
<script type = 'text/javascript'>\n\
var media = new Media();\n\
function Media()\n\
{\n\
this.src;\n\
this.width = 550;\n\
this.height = 400;\n\
this.align;\n\
this.border;\n\
this.autoPlay;\n\
this.InsertTo = function(obj)\n\
{\n\
if (obj)\n\
obj.innerHTML = this.CreateHTML();\n\
}\n\
this.CreateHTML = function()\n\
{\n\
var MPstr = '<OBJECT id=nstv codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading... type=application/x-oleobject classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 ';\n\
if (this.width)\n\
MPstr += ' width=' + this.width; \n\
if (this.height)\n\
MPstr += ' height=' + this.height; \n\
if (this.border)\n\
MPstr += ' border=' + this.border; \n\
if (this.align)\n\
MPstr += ' align=' + this.align; \n\
MPstr += '>';\n\
MPstr += '<PARAM NAME=\\\'AUTOSTART\\\' VALUE=\\\'' + this.autoPlay + '\\\'>';\n\
MPstr += '<PARAM NAME=\\\'uiMode\\\' value=\\\'' + this.uiMode + '\\\'>';\n\
MPstr += '<PARAM NAME=\\\'URL\\\' value=\\\'' + this.src + '\\\'>';\n\
MPstr += '</OBJECT>';\n\
return MPstr;\n\
}\n\
}\n\
function updateMedia()\n\
{\n\
ftb = window.launchParameters['ftb'];\n\
f = ftb.GetNearest('Media');\n\
src = document.getElementById('media_src');\n\
if (src.value == '')\n\
{\n\
alert('请您输入Media路径!');\n\
return false;\n\
}\n\
if (!f)\n\
{\n\
var mpText = '<div style=\\\'background:#000 url(freetextbox/images/insertmedia.gif) no-repeat right bottom; ';\n\
mpText += ' width:' + media.width + '; height:' + media.height + '\\\'>';\n\
mpText += oPreview.innerHTML;\n\
mpText += '</div>';\n\
ftb.InsertHtml(mpText);\n\
img = ftb.GetNearest('a');\n\
}\n\
}\n\
function updatePreview()\n\
{\n\
src = document.getElementById('media_src');\n\
if (src.value == '')\n\
return;\n\
align = document.getElementById('media_align');\n\
border = document.getElementById('media_border');\n\
autoPlay = document.getElementById('media_autoPlay');\n\
uiMode = document.getElementById('media_uiMode');\n\
width = document.getElementById('media_width');\n\
height = document.getElementById('media_height');\n\
oPreview = document.getElementById('preview');\n\
media.src = src.value;\n\
media.align = align.value;\n\
media.border = border.value;\n\
media.autoPlay = autoPlay.checked;\n\
media.width = width.value;\n\
media.height = height.value;\n\
if(uiMode.checked)\n\
{\n\
media.uiMode = 'invisible';\n\
}\n\
else\n\
{\n\
media.uiMode = 'full';\n\
}\n\
media.InsertTo(oPreview);\n\
}\n\
</script>\n\
</head>\n\
<body style = 'border:0px;'>\n\
<form action = ''>\n\
<h3>插入 Microsoft Media</h3>\n\
<table>\n\
<tr>\n\
<td class = 'f_title'>\n\
<div align = 'left'>Media 文件路径:</div>\n\
<input type = 'text' id = 'media_src' style = 'width:240px;' onblur = 'updatePreview();' value = ''/>\n\
</td>\n\
<td rowspan = '6' valign = 'top'>\n\
<fieldset>\n\
<legend>预览</legend>\n\
<div style = 'width:380px;height:300px;overflow:scroll;background-color:#fff;'>\n\
<p id='preview'> </p>\n\
</div>\n\
</fieldset>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td>\n\
<fieldset>\n\
<legend>Media Player 选项</legend>\n\
<table id='table1' width='100%'>\n\
<tr>\n\
<td class = 'f_title' style='text-align: left'>\n\
<input type='checkbox' id='media_uiMode' name='C1' title='播放器面板不可见,作背景音乐' value='isShowStatusBar' onblur = 'updatePreview();'>隐藏播放器</td></tr>\n\
<tr>\n\
<td class = 'f_title' style='text-align: left'>\n\
<input type='checkbox' id='media_autoPlay' name='C2' title='当页面打开时自动播放媒体' value='isAutoPlay' onblur = 'updatePreview();'>自动播放</td></tr>\n\
</table>\n\
</fieldset>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td>\n\
<fieldset>\n\
<legend>大小及布局</legend>\n\
<table>\n\
<tr>\n\
<td>\n\
<table id='table2'>\n\
<tr>\n\
<td class = 'f_title'>宽度:</td>\n\
<td><input type = 'text' id = 'media_width' style = 'width:40px;' onblur = 'updatePreview();' value='550' name='T2' size='20'/></td></tr>\n\
<tr>\n\
<td class = 'f_title'>高度:</td>\n\
<td><input type = 'text' id = 'media_height' style = 'width:40px;' onblur = 'updatePreview();' value='400' name='T3' size='20'/></td></tr>\n\
</table>\n\
</td>\n\
<td>\n\
<table id='table3'>\n\
<tr>\n\
<td class = 'f_title'>对齐方式:</td>\n\
<td>\n\
<select id = 'media_align' style = 'width:70px;' onchange = 'updatePreview();' name='D1'>\n\
<option value = '' selected = '1'>不设置</option>\n\
<option value = 'left'>左</option>\n\
<option value = 'center'>中</option>\n\
<option value = 'right'>右</option>\n\
<option value = 'texttop'>文本上方</option>\n\
<option value = 'AbsMiddle'>正中央</option>\n\
<option value = 'Baseline'>基线</option>\n\
<option value = 'AbsBottom'>正下方</option>\n\
<option value = 'bottom'>下</option>\n\
<option value = 'Middle'>中</option>\n\
<option value = 'Top'>上</option>\n\
</select>\n\
</td>\n\
</tr>\n\
<tr>\n\
<td class = 'f_title'>边框宽度:</td>\n\
<td><input type = 'text' id = 'media_border' style = 'width:70px;' onblur = 'updatePreview();' name='T1' size='20'/></td>\n\
</tr>\n\
</table>\n\
</td>\n\
</tr>\n\
</table>\n\
</fieldset>\n\
</td>\n\
</tr>\n\
</table>\n\
<div class = 'footer'>\n\
<button type = 'button' name = 'updateMediaButton' id = 'updateMediaButton' onclick = 'updateMedia();window.close();'>确定</button>\n\
<button type = 'button' name = 'cancel' id = 'cancelButton' onclick = 'window.close();'>取消</button>\n\
</div>\n\
<script type = 'text/javascript'>\n\
function load()\n\
{\n\
ftb = window.launchParameters['ftb'];\n\
oMedia = ftb.GetNearest('media');\n\
src = document.getElementById('media_src');\n\
align = document.getElementById('media_align');\n\
border = document.getElementById('media_border');\n\
hspace = document.getElementById('media_hspace');\n\
vspace = document.getElementById('media_vspace');\n\
width = document.getElementById('media_width');\n\
height = document.getElementById('media_height');\n\
}\n\
</script>\n\
</form>\n\
</body>\n\
</html>\n\
");
var FTB_FlashPopUpHtml = new String("\n\
<html>\n\
<head>\n\
<meta http-equiv = 'Content-Type' content = 'text/html; charset=utf-8'>\n\
<title> Flash Editor</title>\n\
<style type = 'text/css'>\n\
html, body\n\
{\n\
background-color: #ECE9D8;\n\
color: #000000;\n\
font: 11px Tahoma,Verdana,sans-serif;\n\
padding: 0px;\n\
}\n\
body\n\
{\n\
margin: 5px;\n\
}\n\
form\n\
{\n\
margin: 0px;\n\
padding: 0px;\n\
}\n\
table\n\
{\n\
font: 11px Tahoma, Verdana, sans-serif;\n\
}\n\
form p\n\
{\n\
margin-top: 5px;\n\
margin-bottom: 5px;\n\
}\n\
h3\n\
{\n\
margin: 0;\n\
margin-top: 4px;\n\
margin-bottom: 5px;\n\
font-size: 12px;\n\
border-bottom: 2px solid #90A8F0;\n\
color: #90A8F0;\n\
}\n\
.fl\n\
{\n\
width: 9em;\n\
float: left;\n\
padding: 2px 5px;\n\
text-align: right;\n\
}\n\
.fr\n\
{\n\
width: 7em;\n\
float: left;\n\
padding: 2px 5px;\n\
text-align: right;\n\
}\n\
fieldset\n\
{\n\
padding: 0px 10px 5px 5px;\n\
}\n\
button\n\
{\n\
width: 75px;\n\
}\n\
select, input, button\n\
{\n\
font: 11px Tahoma, Verdana, sans-serif;\n\
}\n\
.space\n\
{\n\
padding: 2px;\n\
}\n\
.title\n\
{\n\
background: #ddf;\n\
color: #000;\n\
font-weight: bold;\n\
font-size: 120%;\n\
padding: 3px 10px;\n\
margin-bottom: 10px;\n\
border-bottom: 1px solid black;\n\
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -