⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ftb-pro.js

📁 本系统是在asp版《在线文件管理器》的基础上设计制作
💻 JS
📖 第 1 页 / 共 5 页
字号:
	text=text.replace(/<\/o:[^>]*>/gi,"");
	text=text.replace(/<\?xml:[^>]*>/gi,"");
	text=text.replace(/<\/?st[^>]*>/gi,"");
	text=text.replace(/<[^>]*</gi,"<");
	text=text.replace(/<SPAN[^>]*>/gi,"");
	text=text.replace(/<SPAN[^class]*>/gi,"");
	text=text.replace(/<\/SPAN>/gi,"");
	//text=text.replace(/<\/A>/gi,"");
	
	// Clear the inner parts of other tags.
	text=text.replace(/style=[^>]*"/g,' ');
	text=text.replace(/style=[^>]*'/g," ");
	text=text.replace(/style=[^>]*>/g,">");
	text=text.replace(/lang=[^>]*>/g,">");
	text=text.replace(/name=[^>]* /g,"");
	text=text.replace(/name=[^>]*>/g,">");
	text=text.replace(/<A[^>]*>/g,"");
	
	//text=text.replace(/<p[^>]*>/gi,"<p>");

	
	
	// Put the tags back
	text=text.replace(/&bold/g,"<B>");
	text=text.replace(/&cbold/g,"</B>");

	text=text.replace(/&ital/g,"<EM>");
	text=text.replace(/&cital/g,"</EM>");

	text=text.replace(/&ultag/g,"<UL>");
	text=text.replace(/&litag/g,"<LI>");
	text=text.replace(/&oltag/g,"<OL>");
	text=text.replace(/&olctag/g,"<\/OL>");	
	text=text.replace(/&lictag/g,"<\/LI>");
	text=text.replace(/&ulctag/g,"<\/UL>");

	text=text.replace(/&parag/g,"<BR>");
	*/
	
	text=text.replace(/<\/?SPAN[^>]*>/gi,"");
	text=text.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");
	text=text.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");
	text=text.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");
	text=text.replace(/<\\?\?xml[^>]*>/gi,"");
	text=text.replace(/<\/?\w+:[^>]*>/gi,"");
	text=text.replace(/<span[^>]*><\/span[^>]*>/ig,"");
	text=text.replace(/<span[^>]*><\/span[^>]*>/ig,"");
	text=text.replace(/<span><span>/ig,"<span>");
	text=text.replace(/&nbsp;/," ");
	var tmp = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi");
	text=text.replace(tmp,"<div$2</div>");
	
	this.designEditor.document.body.innerHTML = text;
}

FTB_FreeTextBox.prototype.CreateLink = function() {
	// impliment pro feature of PopUp window
	
	var linkWin = window.open("","linkWin","width=350,height=155");
	if (linkWin) {
		linkWin.focus();
	} else {
		alert("检测到弹出窗口阻止程序。您的 Web 浏览器必须允许该站点弹出窗口。");
		return;
	}
	
	linkWin.document.body.innerHTML = '';
	linkWin.document.open();	
	linkWin.document.write(FTB_LinkPopUpHtml);
	linkWin.document.close();	
	
	launchParameters = new Object();
	launchParameters['ftb'] = this;
	linkWin.launchParameters = launchParameters;
	linkWin.load();
}

FTB_FreeTextBox.prototype.InsertFlash = function() {
	var flashWin = window.open("","flashWin","width=500,height=310");
	if (flashWin) {
		flashWin.focus();
	} else {
		alert("检测到弹出窗口阻止程序。您的 Web 浏览器必须允许该站点弹出窗口。");
		return;
	}

	flashWin.document.open();
	flashWin.document.write(FTB_FlashPopUpHtml);
	flashWin.document.close();
	
	launchParameters = new Object();
	launchParameters['ftb'] = this;
	flashWin.launchParameters = launchParameters;
	flashWin.load();
}


FTB_FreeTextBox.prototype.InsertEmoticons = function(objId) {
	var o = document.getElementById(objId);
	if (o == null)
		return;
	var position = getPosition(o);
	var width = 324;
	this.popup.style.width = width;
	this.popup.style.height = 232;
	if (!FTB_Browser.isIE)
	{
		this.popup.style.width = 330;
		this.popup.style.height = 238;
	}
	var left = position.left;
	if (left + width > document.body.offsetWidth)
		left = document.body.offsetWidth - width;
	this.popup.style.zIndex = 10;
	this.popup.style.left = left;
	this.popup.style.top = position.top + 16;
	this.popup.style.visibility = ""
	
	launchParameters = new Object();
	launchParameters['ftb'] = this;
	this.iPopup.launchParameters = launchParameters;
	//this.popup.load();

}

FTB_FreeTextBox.prototype.InsertMedia = function() {
	var mediaWin = window.open("","mediaWin","width=660,height=380");
	if (mediaWin) {
		mediaWin.focus();
	} else {
		alert("检测到弹出窗口阻止程序。您的 Web 浏览器必须允许该站点弹出窗口。");
		return;
	}

	mediaWin.document.open();
	mediaWin.document.write(FTB_MediaPopUpHtml);
	mediaWin.document.close();
	
	launchParameters = new Object();
	launchParameters['ftb'] = this;
	mediaWin.launchParameters = launchParameters;
	mediaWin.load();	
}

FTB_FreeTextBox.prototype.InsertReal = function() {
	var realWin = window.open("","realWin","width=660,height=380");
	if (realWin) {
		realWin.focus();
	} else {
		alert("检测到弹出窗口阻止程序。您的 Web 浏览器必须允许该站点弹出窗口。");
		return;
	}

	realWin.document.open();
	realWin.document.write(FTB_RealPopUpHtml);
	realWin.document.close();
	
	launchParameters = new Object();
	launchParameters['ftb'] = this;
	realWin.launchParameters = launchParameters;
	realWin.load();	
}

FTB_FreeTextBox.prototype.InsertCode = function() {
	var codeWin = window.open("insertcode.aspx","codeWin","width=530,height=420,status=0,toolbars=0");
	if (codeWin) {
		codeWin.focus();
	} else {
		alert("检测到弹出窗口阻止程序。您的 Web 浏览器必须允许该站点弹出窗口。");
		return;
	}

}
/* PopUpScripts 
---------------------------------------- */

var FTB_RealPopUpHtml = new String("\n\
<html>\n\
<head>\n\
	<meta http-equiv = 'Content-Type' content = 'text/html; charset=gb2312'>\n\
	<title>Real 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 real = new Real();\n\
		function Real()\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 RPstr = '';\n\
				if (this.showImageWindow)\n\
				{\n\
					RPstr += '<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX ';\n\
					if (this.border)\n\
						RPstr += ' border=' + this.border; \n\
					if (this.width)\n\
						RPstr += ' width=' + this.width;\n\
					if (this.height)\n\
						RPstr += ' height=' + this.height;\n\
					if (this.align)\n\
						RPstr += ' align=' + this.align; \n\
					RPstr += '>';\n\
					RPstr += '<PARAM NAME=SRC VALUE=' + this.src + '>';\n\
					RPstr += '<PARAM NAME=CONSOLE VALUE=Clip1>';\n\
					RPstr += '<PARAM NAME=CONTROLS VALUE=imagewindow>';\n\
					RPstr += '<PARAM NAME=AUTOSTART VALUE=' + this.autoPlay + '>';\n\
					RPstr += '</OBJECT><br>';\n\
				}\n\
				RPstr += '<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 ';\n\
				if (this.border)\n\
					RPstr += ' border=' + this.border;\n\
				if (this.width)\n\
					RPstr += ' width=' + this.width;\n\
				if (this.align)\n\
					RPstr += ' align=' + this.align;\n\
				RPstr += '>';\n\
				RPstr += '<PARAM NAME=SRC VALUE=' + this.src + '>';\n\
				RPstr += '<PARAM NAME=AUTOSTART VALUE=' + this.autoPlay + '>';\n\
				RPstr += '<PARAM NAME=CONTROLS VALUE=controlpanel>';\n\
				RPstr += '<PARAM NAME=CONSOLE VALUE=Clip1>';\n\
				RPstr += '</OBJECT>';\n\
				return RPstr;\n\
			}\n\
		}\n\
		function updateReal()\n\
		{\n\
			ftb = window.launchParameters['ftb'];\n\
			f = ftb.GetNearest('Real');\n\
			src = document.getElementById('real_src');\n\
			if (src.value == '')\n\
			{\n\
				alert('请您输入Real路径!');\n\
				return false;\n\
			}\n\
			if (!f)\n\
			{\n\
				var rpText = '<div style=\\\'background:#000 url(freetextbox/images/insertreal.gif) no-repeat right bottom; ';\n\
				rpText += ' width:' + real.width + '; height:' + real.height + '\\\'>';\
				rpText += oPreview.innerHTML;\
				rpText += '</div>';\n\
				ftb.InsertHtml(rpText);\n\
				img = ftb.GetNearest('a');\n\
			}\n\
		}\n\
		function updatePreview()\n\
		{\n\
			src = document.getElementById('real_src');\n\
			if (src.value == '')\n\
				return;\n\
			align = document.getElementById('real_align');\n\
			border = document.getElementById('real_border');\n\
			autoPlay = document.getElementById('real_autoPlay');\n\
			showImageWindow = document.getElementById('real_showImageWindow');\n\
			width = document.getElementById('real_width');\n\
			height = document.getElementById('real_height');\n\
			oPreview = document.getElementById('preview');\n\
			real.src = src.value;\n\
			real.align = align.value;\n\
			real.border = border.value;\n\
			real.autoPlay = autoPlay.checked;\n\
			real.width = width.value;\n\
			real.height = height.value;\n\
			if (autoPlay.checked)\n\
			{\n\
				real.autoPlay = -1;\n\
			}\n\
			else\n\
			{\n\
				real.autoPlay = 0;\n\
			}\n\
			if (showImageWindow.checked)\n\
			{\n\
				real.showImageWindow = 1;\n\
			}\n\
			else\n\
			{\n\
				real.showImageWindow = 0;\n\
			}\n\
			real.InsertTo(oPreview);\n\
		}\n\
	</script>\n\
</head>\n\
<body style = 'border:0px;'>\n\
	<form action = ''>\n\
		<h3>插入&nbsp;Real&nbsp;Media</h3>\n\
		<table>\n\
			<tr>\n\
				<td class = 'f_title'>\n\
				<div align = 'left'>Real&nbsp;文件路径:</div>\n\
				<input type = 'text' id = 'real_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'>&nbsp;</p>\n\
						</div>\n\
					</fieldset>\n\
				</td>\n\
			</tr>\n\
			<tr>\n\
				<td>\n\
					<fieldset>\n\
					<legend>Real&nbsp;Player&nbsp;选项</legend>\n\
						<table id='table1' width='100%'>\n\
							<tr>\n\
								<td class = 'f_title' style='text-align: left'>\n\
								<input type='checkbox' id='real_showImageWindow' 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='real_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\

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -