亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ftb-freetextbox.js

?? 網博企業全站開源版 v1.0 vb.net開發
?? JS
?? 第 1 頁 / 共 3 頁
字號:

/* main FTB object
-------------------------------------- */
function FTB_FreeTextBox(id, enableToolbars, readOnly, buttons, dropdownlists, breakMode, pasteMode, tabMode, startMode, clientSideTextChanged, designModeCss, baseUrl, buttonImageFormat, imageGalleryUrl, imageGalleryPath, receiveFocus, buttonWidth, buttonHeight) {
	this.debug = document.getElementById('debug');
	
	this.id = id;
	this.enableToolbars = enableToolbars;
	this.readOnly = readOnly;
	this.buttons = buttons;
	this.dropdownlists = dropdownlists;
	this.breakMode = breakMode;
	this.pasteMode = pasteMode;
	this.tabMode = tabMode;
	this.clientSideTextChanged = clientSideTextChanged;	this.designModeCss = designModeCss;
	this.baseUrl = baseUrl;
	this.buttonImageFormat = buttonImageFormat; // currently unused
	this.imageGalleryUrl = imageGalleryUrl;
	this.imageGalleryPath = imageGalleryPath;	
	this.hasFocus = false;
	this.mode = FTB_MODE_DESIGN;
	this.initialized = false;
	this.undoArray = new Array();
	this.undoArrayMax = 16;
	this.undoArrayPos = -1;
	this.lastEvent = null;
//};
//FTB_FreeTextBox.prototype.Initialize = function() {
	var ftb = this;
		// 2. Find everything
	//* windows
	this.htmlEditor = document.getElementById(this.id);

	if (FTB_Browser.isIE) {
		this.previewPane = eval(this.id + "_previewPane");
		this.designEditor = eval(this.id + "_designEditor");
		this.designEditor.ftb = this;
		this.designEditor.document.ftb = this;
		document.getElementById(this.id + "_designEditor").document.ftb = this;
	} else {
		this.previewPane = document.getElementById(this.id + "_previewPane").contentWindow;
		this.designEditor = document.getElementById(this.id + "_designEditor").contentWindow;
		this.designEditor.document.ftb = this;		
	}

	//* areas
	this.toolbarArea = document.getElementById(this.id + "_toolbarArea");
	this.designEditorArea = document.getElementById(this.id + "_designEditorArea");
	this.htmlEditorArea = document.getElementById(this.id + "_htmlEditorArea");
	this.previewPaneArea = document.getElementById(this.id + "_previewPaneArea");

	//* tabs
	this.designModeTab = document.getElementById(this.id + "_designModeTab");
	if (this.designModeTab) {
		this.designModeTab.ftb = this;
		this.designModeTab.onclick = function() { if (!this.ftb.readOnly) {this.ftb.GoToDesignMode(); this.ftb.Focus(); this.ftb.UpdateToolbars(); }}
	}

	this.htmlModeTab = document.getElementById(this.id + "_htmlModeTab");
	if (this.htmlModeTab) {
		this.htmlModeTab.ftb = this;
		this.htmlModeTab.onclick = function() { if (!this.ftb.readOnly) {this.ftb.GoToHtmlMode(); this.ftb.Focus();  this.ftb.UpdateToolbars(); }}
	}

	this.previewModeTab = document.getElementById(this.id + "_previewModeTab");
	if (this.previewModeTab) {
		this.previewModeTab.ftb = this;
		this.previewModeTab.onclick = function() { if (!this.ftb.readOnly) {this.ftb.GoToPreviewMode();}}
	}
	
	//* ancestor area
	this.ancestorArea = document.getElementById(this.id + "_AncestorArea");

	// 3. Tell buttons who owns them
	//* setup buttons & dropdowns
	if (this.enableToolbars) {
		for(var i=0; i<this.buttons.length; i++) {
			button = this.buttons[i];
			button.ftb = this;
		}
		for(var i=0; i<this.dropdownlists.length; i++) {
			dropdownlist = this.dropdownlists[i];
			dropdownlist.ftb = this;
		}
	}
       
	
	// 4. Setup editor for use
	if (!this.readOnly) {
		this.designEditor.document.designMode = 'On';

		if (FTB_Browser.isGecko) this.designEditor.document.contentEditable = true;		
   	}
	
	//((this.designModeCss != '') ? "<link rel='stylesheet' href='" + this.designModeCss + "' type='text/css' />" : "") + 
	//((this.designModeCss != '') ? "<style type='text/css'>@import url(" + this.designModeCss + ");</style>" : "") + 
	this.designEditor.document.open();
	this.designEditor.document.write("<html>" + 
			"<head>" + 
			((this.designModeCss != '' && !FTB_Browser.isGecko) ? "<style type='text/css'>@import url(" + this.designModeCss + ");</style>" : "") + 
			((this.baseUrl != '') ? "<base href='" + this.baseUrl + "' />" : "") + 
			"</head>" + 
			"<body>" + this.htmlEditor.value + "</body>" + 
		"</html>");
	this.designEditor.document.close();
	
	if (FTB_Browser.isGecko)
		this.designEditor.document.execCommand("useCSS", false, true);	
	
	if (!this.readOnly) {	
		if (FTB_Browser.isIE) this.designEditor.document.body.contentEditable = true;		
		// enable this html area
		this.htmlEditor.disabled = '';
	}	
	
	// silly IE can't get the style right until now...
	if (FTB_Browser.isIE) {
		this.designEditor.document.body.style.border = '0';		
		//if (designModeCss != '') 
		//	this.designEditor.document.createStyleSheet(designModeCss);		
	}
	
	// 5. Add events
    if (!this.readOnly) {
		if (FTB_Browser.isIE) {
			FTB_AddEvents(this.designEditor.document,
				new Array("keydown","keypress","mousedown"),
				function(e) { ftb.hasFocus=true; return ftb.Event(e); } 
			);
		} else {
			var evt = function(e) {	
				this.document.ftb.hasFocus=true; 
				this.document.ftb.Event(e);
				return false;
			}
			this.designEditor.addEventListener("keydown", evt, true);			
			this.designEditor.addEventListener("keypress", evt, true);			
			this.designEditor.addEventListener("mousedown", evt, true);

      		// no paste event in Mozilla
		}
		FTB_AddEvents(this.designEditor,
			new Array("blur"),
			function(e) { ftb.hasFocus=false; ftb.Event(e); ftb.StoreHtml(); } 
		);
	}
     	
	if (this.startMode == FTB_MODE_HTML)
		this.GoToHtmlMode();
		
	if (this.readOnly) 
		this.DisableAllToolbarItems();
	else
		this.UpdateToolbars();
	
	//this.undoArray[0] = this.htmlEditorArea.value;
	this.initialized = true;
	if (this.receiveFocus) this.Focus();
};

FTB_FreeTextBox.prototype.AddStyle = function(css) {
	var styleEl=document.createElement('style');
	styleEl.type='text/css';
	styleEl.appendChild(css);
	this.designEditor.document.appendChild(styleEl);
};

FTB_FreeTextBox.prototype.Event = function(ev) {
 	if (ev != null) { 	

 		if (FTB_Browser.isIE) {
 			sel = this.GetSelection();
 			r = this.CreateRange(sel);	 		
	 		
 			// check for undo && redo
 			if (ev.ctrlKey && ev.keyCode == FTB_KEY_Z) {
 				this.Undo();
				this.CancelEvent(ev);			
 			} else if (ev.ctrlKey && ev.keyCode == FTB_KEY_Y) { 			
 				this.Redo(); 
				this.CancelEvent(ev);
 			} else {
		 		
 				if (ev.keyCode == FTB_KEY_ENTER) {
 					if (this.breakMode == FTB_BREAK_BR || ev.ctrlKey) {
						if (sel.type == 'Control') {
							return;
						}
						if ((!this.CheckTag(r.parentElement(),'LI'))&&(!this.CheckTag(r.parentElement(),'H'))) {
							r.pasteHTML('<br>');
							this.CancelEvent(ev);
							r.select();
							r.collapse(false);
							return false;
						} 			
 					} 
				} else if ((ev.ctrlKey && !ev.shiftKey && !ev.altKey)) {					
					if (ev.keyCode == FTB_KEY_V || ev.keyCode == 118) {										
						this.CapturePaste();
						this.CancelEvent(ev);
					}
 				} else if (ev.keyCode == FTB_KEY_TAB) {	
	 				if (this.CheckTag(r.parentElement(),'LI')) {
	 					if (ev.shiftKey)
	 						this.ExecuteCommand("outdent");
	 					else
	 						this.ExecuteCommand("indent");
	 					this.CancelEvent(ev);
	 				} else {	 				
	 					switch (this.tabMode) {
	 						default:
	 						case FTB_TAB_NEXTCONTROL:
	 							break;
	 						case FTB_TAB_INSERTSPACES:
	 							this.InsertHtml("&nbsp;&nbsp;&nbsp;");
	 							this.CancelEvent(ev);
	 							break;
	 						case FTB_TAB_DISABLED:
	 							this.CancelEvent(ev);
	 							break;	 						
	 					}
	 				}
 				}
 			}
	 	
 		} else { 	 	
	 		if (ev.type == "keypress" || ev.type == "keydown") {
	 			
	 			
				// check for undo && redo
				if (ev.ctrlKey && ev.which && ev.which == FTB_KEY_Z) {	 			
					this.Undo();
					this.CancelEvent(ev);		
				} else if (ev.ctrlKey && ev.which && ev.which == FTB_KEY_Y) {	 			
					this.Redo(); 
					this.CancelEvent(ev);		
				} else {

					if (ev.keyCode == FTB_KEY_ENTER) {
						if (this.breakMode == FTB_BREAK_P) {
							/*
							var insertP = true;
							var parent = this.GetParentElement();

							if ( parent != null ) 
								if (this.CheckTag(this.GetParentElement(),'LI') )
									insertP = false;

							if (!insertP) return;

							if ( parent != null ) {
								if ( !this.CheckTag(this.GetParentElement(),'P') )
									this.ExecuteCommand('formatblock','','p');
							} else {
								this.ExecuteCommand('formatblock','','p');
							}
							var parent = this.GetParentElement();
							p = this.designEditor.document.createElement('p');

							sel = this.GetSelection();
							r = this.CreateRange(sel);
							r.insertNode(p);
							r.selectNode(p);
							//p.focus();

							//
							//parent.insertBefore(p);

							this.CancelEvent(ev);	
							*/
						}

					// check for control+commands (not in Mozilla by default)
					} else if ((ev.ctrlKey && !ev.shiftKey && !ev.altKey)) {
						
						if (ev.which == FTB_KEY_V || ev.which == 118) {										
							if (ev.which == 118 && this.pasteMode != FTB_PASTE_DEFAULT) {
								this.CapturePaste();
								this.CancelEvent(ev);
							}
						} else if (ev.which == FTB_KEY_B || ev.which == 98) {
							if (ev.which == FTB_KEY_B) this.ExecuteCommand('bold');
							this.CancelEvent(ev);
						} else if (ev.which == FTB_KEY_I || ev.which == 105) {
							if (ev.which == FTB_KEY_I) this.ExecuteCommand('italic');
							this.CancelEvent(ev);
						} else if (ev.which == FTB_KEY_U || ev.which == 117) {
							if (ev.which == FTB_KEY_U) this.ExecuteCommand('underline');				 						
							this.CancelEvent(ev);
						}
					} else if (ev.which == FTB_KEY_TAB) {
						if (this.CheckTag(r.parentElement,'LI')) {
							// do it's own thing!
						} else {	 				
							switch (this.tabMode) {
								default:
								case FTB_TAB_NEXTCONTROL:
									// unsupported in Mozilla
									break;
								case FTB_TAB_INSERTSPACES:
									// do it's own thing
									break;
								case FTB_TAB_DISABLED:
									this.CancelEvent(ev);
									break;	 						
							}
						}			

					}
				}
  			} 	
 		}
 	}
 
	if (this.mode == FTB_MODE_DESIGN) {
		FTB_Timeout.addMethod(this.id+'_UpdateToolbars',this,'UpdateToolbars',200);
	}
	
	if (this.clientSideTextChanged)
		this.clientSideTextChanged(this);
};
FTB_FreeTextBox.prototype.CancelEvent = function(ev) {
	if (FTB_Browser.isIE) {
		ev.cancelBubble = true;
		ev.returnValue = false;
	} else {
		ev.preventDefault();
		ev.stopPropagation();
	}
};
FTB_FreeTextBox.prototype.InsertElement = function(el) {
	var sel = this.GetSelection();
	var range = this.CreateRange(sel);
	
	if (FTB_Browser.isIE) {
		range.pasteHTML(el.outerHTML);
	} else {
		this.InsertNodeAtSelection(el);
	}
};
FTB_FreeTextBox.prototype.RecordUndoStep = function() {	

	++this.undoArrayPos;
	if (this.undoArrayPos >= this.undoArrayMax) {
		// remove the first element
		this.undoArray.shift();
		--this.undoArrayPos;
	}
	
	var take = true;
	var html = this.designEditor.document.body.innerHTML;
	if (this.undoArrayPos > 0)
		take = (this.undoArray[this.undoArrayPos - 1] != html);
	if (take) {
		this.undoArray[this.undoArrayPos] = html;
	} else {
		this.undoArrayPos--;
	}
};
FTB_FreeTextBox.prototype.Undo = function() {
	if (this.undoArrayPos > 0) {
		var html = this.undoArray[--this.undoArrayPos];
		if (html)
			this.designEditor.document.body.innerHTML = html;
		else 
			++this.undoArrayPos;
	}
};
FTB_FreeTextBox.prototype.CanUndo = function() {
	return true;
	return (this.undoArrayPos > 0);
};
FTB_FreeTextBox.prototype.Redo = function() {
	if (this.undoArrayPos < this.undoArray.length - 1) {
		var html = this.undoArray[++this.undoArrayPos];
		if (html) 
			this.designEditor.document.body.innerHTML = html;
		else 
			--this.undoArrayPos;
	}
	
};
FTB_FreeTextBox.prototype.CanRedo = function() {
	return true;
	return (this.undoArrayPos < this.undoArray.length - 1);
};
FTB_FreeTextBox.prototype.CapturePaste = function() {
 
 	switch (this.pasteMode) {
 		case FTB_PASTE_DISABLED:
 			return false;
 		case FTB_PASTE_TEXT:
 			if (window.clipboardData) {
				var text = window.clipboardData.getData('Text');
				text = text.replace(/<[^>]*>/gi,'');
				this.InsertHtml(text);
			} else {
				alert("Your browser does not support pasting rich content");
			}
			return false; 				
 		default:
 		case FTB_PASTE_DEFAULT:
			try {
				this.ExecuteCommand('paste'); 
			} catch (e) {
				alert('Your security settings to not allow you to use this command.  Please visit http://www.mozilla.org/editor/midasdemo/securityprefs.html for more information.');
			}	
 			return true;
 	}		
};
FTB_FreeTextBox.prototype.Debug = function(text) {
	if (this.debug)
		this.debug.value += text + '\r';
};
FTB_FreeTextBox.prototype.UpdateToolbars = function() {
	
	if (this.hasFocus) {

		if (this.mode == FTB_MODE_DESIGN) {
			if (this.enableToolbars) {
				for (var i=0; i<this.buttons.length; i++) {
					button = this.buttons[i];

					if (button.customStateQuery)
						button.state = button.customStateQuery();			
					else if (button.commandIdentifier != null && button.commandIdentifier != '')
						button.state = this.QueryCommandState(button.commandIdentifier);

					button.SetButtonBackground("Out");
				}
				for (var i=0; i<this.dropdownlists.length; i++) {
					dropdownlist = this.dropdownlists[i];

					if (dropdownlist.customStateQuery)
						dropdownlist.SetSelected(dropdownlist.customStateQuery());
					else if (dropdownlist.commandIdentifier != null && dropdownlist.commandIdentifier != '') 
						dropdownlist.SetSelected(this.QueryCommandValue(dropdownlist.commandIdentifier));

				}
			}
			this.UpdateAncestorTrail();
		}	
		
	} else {
	
		if (this.enableToolbars) {
			for (var i=0; i<this.buttons.length; i++) {
				button = this.buttons[i];
				button.state = FTB_BUTTON_OFF;
				button.SetButtonBackground("Out");
			}
			for (var i=0; i<this.dropdownlists.length; i++) {
				dropdownlist = this.dropdownlists[i];
				dropdownlist.list.selectedIndex = 0;
			}
		}
		this.UpdateAncestorTrail();		
	}

	if (!this.undoTimer) {
		this.RecordUndoStep();
		var editor = this;
		this.undoTimer = setTimeout(function() {
			editor.undoTimer = null;
		}, 500);
	}
	
	this.SetToolbarItemsEnabledState();	
	
	if (this.timerToolbar) 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区四区五区| 亚洲一级二级在线| 自拍偷拍欧美精品| 久久国产精品99精品国产 | 一区二区免费看| 狠狠色丁香久久婷婷综| 91成人网在线| 国产精品电影一区二区| 国产美女精品人人做人人爽| 欧美日韩国产中文| 18成人在线观看| 国产成+人+日韩+欧美+亚洲| 56国语精品自产拍在线观看| 亚洲一区免费在线观看| 99在线精品视频| 国产人成一区二区三区影院| 美女脱光内衣内裤视频久久影院| 在线视频国内自拍亚洲视频| 成人免费在线播放视频| 国产成人av电影在线| 久久综合av免费| 久久99国产精品麻豆| 日韩精品一区国产麻豆| 免费在线观看一区二区三区| 欧美日韩高清不卡| 亚洲成人黄色小说| 欧美精品自拍偷拍动漫精品| 一个色妞综合视频在线观看| 91国产免费观看| 亚洲综合免费观看高清完整版在线| 91女厕偷拍女厕偷拍高清| 最新日韩在线视频| 99精品国产热久久91蜜凸| 椎名由奈av一区二区三区| 日本丰满少妇一区二区三区| 亚洲精品视频一区二区| 99re66热这里只有精品3直播| 国产亚洲精品资源在线26u| 国产激情视频一区二区三区欧美| 久久综合网色—综合色88| 国产福利91精品一区| 欧美国产激情一区二区三区蜜月| 国产白丝网站精品污在线入口| 国产肉丝袜一区二区| jlzzjlzz亚洲日本少妇| 亚洲色图制服诱惑| 欧美剧在线免费观看网站| 蜜桃精品在线观看| 久久欧美中文字幕| 99久久精品99国产精品| 亚洲一区在线电影| 日韩欧美亚洲另类制服综合在线| 国产在线国偷精品免费看| 国产偷国产偷亚洲高清人白洁 | 久久亚区不卡日本| 北岛玲一区二区三区四区| 亚洲精品成人精品456| 欧美美女网站色| 国产麻豆视频精品| 亚洲乱码国产乱码精品精98午夜 | 极品少妇一区二区三区精品视频| 精品福利在线导航| 91在线视频网址| 亚洲高清免费观看| 久久精品人人爽人人爽| 91国偷自产一区二区三区观看| 日韩av一级电影| 中文字幕一区在线观看视频| 欧美日韩一区二区在线视频| 国产盗摄一区二区| 午夜精品久久久久久久蜜桃app| 精品国产91乱码一区二区三区 | 日日摸夜夜添夜夜添国产精品 | 欧美大片在线观看一区二区| 99国产欧美久久久精品| 喷水一区二区三区| 最新不卡av在线| 亚洲精品在线一区二区| 欧美日韩在线播放三区四区| 国产成人8x视频一区二区| 偷拍一区二区三区| **欧美大码日韩| 国产亚洲va综合人人澡精品 | 国产亚洲欧美一区在线观看| 欧美人妇做爰xxxⅹ性高电影| 国产福利91精品一区二区三区| 午夜精品影院在线观看| 亚洲人成影院在线观看| 久久久不卡网国产精品二区| 欧美色爱综合网| 波多野结衣在线一区| 国产一区二区三区在线观看免费| 亚洲国产sm捆绑调教视频 | 91首页免费视频| 国产高清久久久久| 麻豆精品一区二区av白丝在线| 亚洲夂夂婷婷色拍ww47| 中文字幕制服丝袜成人av| 久久久久久久久99精品| 精品久久五月天| 欧美一区二区三区在线视频| 欧美日韩一级片在线观看| 97aⅴ精品视频一二三区| 成人视屏免费看| 国产精品影视天天线| 国产露脸91国语对白| 国产曰批免费观看久久久| 美女国产一区二区三区| 欧美96一区二区免费视频| 亚洲国产精品久久久久秋霞影院| 成人欧美一区二区三区1314| 国产精品乱码久久久久久| 中文字幕精品一区二区精品绿巨人| 亚洲精品一区二区在线观看| 久久久久久麻豆| 精品sm捆绑视频| 久久精品网站免费观看| 欧美视频在线观看一区| 91成人看片片| 99国产一区二区三精品乱码| www.欧美.com| 91在线国产观看| 99久久精品国产导航| 99国产麻豆精品| 欧美日韩一区二区电影| 69久久99精品久久久久婷婷| 91精品国产麻豆国产自产在线 | 91欧美一区二区| 色欧美片视频在线观看在线视频| 一本在线高清不卡dvd| 欧美三级中文字幕在线观看| 欧美日韩视频在线观看一区二区三区 | 日本免费新一区视频| 老司机精品视频在线| 精品一区二区三区不卡| 国产91高潮流白浆在线麻豆| www.久久久久久久久| 欧美日韩一二三区| 欧美成人女星排名| 中文字幕欧美一| 亚洲国产精品久久久男人的天堂| 麻豆专区一区二区三区四区五区| 国产伦精品一区二区三区免费迷| 东方aⅴ免费观看久久av| 色婷婷综合在线| 日韩视频免费观看高清完整版在线观看 | 亚洲欧美激情插| 蜜臀av性久久久久蜜臀aⅴ| 国产精品一区免费在线观看| 欧美最新大片在线看| 欧美一卡二卡在线观看| 国产精品午夜免费| 日韩高清国产一区在线| 成人激情开心网| 欧美一区二区大片| 中文字幕一区三区| 精品一区二区免费| 欧洲中文字幕精品| 久久精品一区蜜桃臀影院| 亚洲国产精品一区二区久久| 经典三级一区二区| 欧美视频一区在线| 国产精品第13页| 国产在线视频一区二区| 欧美日韩在线综合| 国产精品美女久久久久aⅴ| 人人爽香蕉精品| 在线观看视频一区二区| 国产日韩精品一区| 另类小说综合欧美亚洲| 欧美性videosxxxxx| 亚洲国产精品99久久久久久久久| 日韩成人av影视| 91福利资源站| 国产精品福利影院| 韩国女主播成人在线| 欧美日本在线视频| 一区二区三区四区蜜桃| 福利一区二区在线观看| 日韩免费高清电影| 视频在线观看91| 日本丶国产丶欧美色综合| 1024精品合集| 国产精品一二三| 2020国产成人综合网| 秋霞av亚洲一区二区三| 欧美日韩另类国产亚洲欧美一级| 国产精品欧美一级免费| 懂色av噜噜一区二区三区av| 久久久精品国产免大香伊| 免费人成精品欧美精品| 欧美一级久久久久久久大片| 亚洲成a人v欧美综合天堂| 在线一区二区三区四区五区| 亚洲特黄一级片| 色欧美88888久久久久久影院| 国产精品国产自产拍在线| av中文字幕亚洲| 亚洲精品国产成人久久av盗摄 | 亚洲欧美日韩人成在线播放|