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

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

?? ftb-freetextbox.js

?? link to SQL 2005/2
?? JS
?? 第 1 頁 / 共 4 頁
字號:

/* main FTB object
-------------------------------------- */
function FTB_FreeTextBox(id, enableToolbars, readOnly, buttons, dropdownlists, breakMode, pasteMode, tabMode, startMode, clientSideTextChanged, designModeCss, designModeBodyTagCssClass, baseUrl, textDirection, 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.startMode = startMode;
	this.clientSideTextChanged = clientSideTextChanged;

	this.designModeCss = designModeCss;
	this.designModeBodyTagCssClass = designModeBodyTagCssClass;
	this.baseUrl = baseUrl;
	this.textDirection = textDirection;
	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.ftb.readOnly) {
		
			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;
			if (!this.readOnly)
				button.Initialize();
		}
		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 != '') ? "<style type='text/css'>@import url(" + this.designModeCss + ");</style>" : "") + 
	this.designEditor.document.open();
	this.designEditor.document.write("<html" + ((this.textDirection == "rtl") ? " dir='rtl'" : "") + ">" + 
			"<head>" + 
			((this.designModeCss != '') ? "<link rel='stylesheet' href='" + this.designModeCss + "' type='text/css' />" : "") + 
			((this.baseUrl != '') ? "<base href='" + this.baseUrl + "' />" : "") + 
			"</head>" + 
			"<body" + ((this.designModeBodyTagCssClass != '') ? " class='" + this.designModeBodyTagCssClass + "'" : "") + ">" + 
				this.StoreUrls(this.htmlEditor.value) + 
			"</body>" + 
		"</html>");
	this.designEditor.document.close();
	
	if (FTB_Browser.isIE) 	 {
		this.designEditor.document.execCommand("2D-Position", true, true);
		this.designEditor.document.execCommand("MultipleSelection", true, true);	
	}
	
	if (!this.readOnly) {	
		if (FTB_Browser.isIE) this.designEditor.document.body.contentEditable = true;		
		// enable this html area
		this.htmlEditor.disabled = '';
	}	
	
	// IE can't get the style right until now...
	if (FTB_Browser.isIE) {
		this.designEditor.document.body.style.border = '0';		
	}
	
	
	// 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); } 
			);

			FTB_AddEvent(this.designEditor.document.body,
				"blur",
				function(e) { ftb.Event(e); ftb.hasFocus=false; ftb.StoreHtml(); } 
			);			
		} else {
			var evt = function(e) {	
				//alert(this.document.ftb);
				if (this.document.ftb != null) {					
					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 (FTB_Browser.isGecko && !this.readOnly && this.startMode != FTB_MODE_HTML) {
		this.designEditor.document.designMode = 'On';
		this.designEditor.document.execCommand("useCSS", false, true);
	}	
	
	if (this.receiveFocus) this.Focus();	
};


FTB_FreeTextBox.prototype.StoreUrls = function(input) {
	// store urls in temporary attribute (if not already done)
	if (!input.match(/(temp_src|temp_href)/gi, input)) {
		input = input.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"', 'gi'), 'src="$1" temp_src="$1"');
		input = input.replace(new RegExp('href\\s*=\\s*\"([^ >\"]*)\"', 'gi'), 'href="$1" temp_href="$1"');
	}
	return input;
}

FTB_FreeTextBox.prototype.RemoveTempUrls = function(input) {	
	input = input.replace(new RegExp('\\s*temp_src\\s*=\\s*\"([^ >\"]*)\"', 'gi'), '');
	input = input.replace(new RegExp('\\s*temp_href\\s*=\\s*\"([^ >\"]*)\"', 'gi'), '');
	return input;
}

FTB_FreeTextBox.prototype.DesignTabClick = function() {
	this.GoToDesignMode(); 
	this.Focus(); 
	this.UpdateToolbars(); 	
}

FTB_FreeTextBox.prototype.HtmlTabClick = function() {
	this.GoToHtmlMode(); 
	this.Focus();
	this.UpdateToolbars();
}

FTB_FreeTextBox.prototype.RefreshDesignMode = function() {
	if (!this.readOnly && FTB_Browser.isGecko) {
		this.designEditor.document.designMode = 'on'; 
		this.designEditor.document.execCommand('useCSS', false, true); 
	}
}

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) {
 	this.hasFocus = true;
	
	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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美另类小说视频| 欧美日韩成人激情| 在线欧美日韩国产| 69久久99精品久久久久婷婷| 精品91自产拍在线观看一区| 国产三级精品三级| 中文字幕成人av| 亚洲线精品一区二区三区| 欧美一区二区三区喷汁尤物| 精品美女一区二区| 欧美电影精品一区二区 | 青椒成人免费视频| 成人少妇影院yyyy| 在线看国产一区二区| 久久亚洲影视婷婷| 亚洲国产一区二区视频| 国产大片一区二区| 在线成人午夜影院| 国产精品免费av| 免费成人美女在线观看| 99精品欧美一区二区三区小说| 91精品国产日韩91久久久久久| 国产精品久久久久久久久图文区| 日韩黄色免费电影| 99精品国产热久久91蜜凸| 精品国偷自产国产一区| 亚洲国产裸拍裸体视频在线观看乱了| 国产成人亚洲综合a∨婷婷图片| 精品污污网站免费看| 国产精品护士白丝一区av| 日韩天堂在线观看| 在线中文字幕不卡| 视频一区二区中文字幕| 麻豆一区二区三区| 美女在线一区二区| 精品国产一区久久| 久久久www成人免费毛片麻豆| 日韩欧美在线1卡| 另类专区欧美蜜桃臀第一页| 国产精品不卡在线观看| 亚洲综合久久av| 色八戒一区二区三区| 欧美一级免费观看| 精品欧美一区二区三区精品久久| 精彩视频一区二区| 九一九一国产精品| 爽爽淫人综合网网站| 丁香另类激情小说| 欧美日韩国产小视频| 国产日韩欧美一区二区三区综合| 欧美午夜电影在线播放| 欧美成人乱码一区二区三区| 亚洲欧美一区二区三区极速播放| 日本不卡高清视频| 中文字幕久久午夜不卡| 五月激情综合网| 国产亚洲精品资源在线26u| 欧美一级理论片| 国产精品久久久久婷婷| 精品久久一二三区| 亚洲国产成人av| 成人毛片视频在线观看| 成人理论电影网| 欧美日韩国产一级| 中文字幕一区二区三| 久久亚洲春色中文字幕久久久| 成人精品视频一区二区三区尤物| 国产主播一区二区| 51精品秘密在线观看| 欧美另类高清zo欧美| 亚洲人成伊人成综合网小说| 亚洲少妇中出一区| 国产成人av电影在线播放| 国产一区二区免费在线| 在线成人高清不卡| 欧美熟乱第一页| 成人黄色小视频在线观看| 亚洲精品一线二线三线| 精品粉嫩超白一线天av| 日韩专区中文字幕一区二区| 欧美综合一区二区| 这里只有精品免费| 五月天婷婷综合| 欧美午夜精品一区二区蜜桃 | 久久蜜桃一区二区| 日韩欧美卡一卡二| 4hu四虎永久在线影院成人| 精品国产污网站| 美女视频黄频大全不卡视频在线播放| 久久九九久久九九| 国产欧美精品一区二区色综合| 中文字幕制服丝袜成人av| 国产不卡视频在线播放| 91亚洲精华国产精华精华液| 欧美视频一区二区三区| 成人精品小蝌蚪| 在线观看日韩一区| 亚洲一区二区av电影| 色天天综合色天天久久| 国产精品视频一二三区| 成人性生交大片免费看在线播放| 国产欧美综合在线观看第十页 | 欧美一区二区三区公司| 天天av天天翘天天综合网| 欧美日韩视频不卡| 精品成人一区二区三区| 男女性色大片免费观看一区二区| 韩国在线一区二区| 国产无遮挡一区二区三区毛片日本| 国产精品乱码久久久久久| 国产精品免费av| 成人a区在线观看| 色欧美日韩亚洲| 91精品国产免费| 美女视频网站久久| 日韩精品一二三四| 久久免费午夜影院| 亚洲免费观看在线视频| 青青青伊人色综合久久| 久久先锋影音av鲁色资源| 一区二区三区成人在线视频| 精品亚洲免费视频| 一本色道a无线码一区v| 成人黄色av电影| 日韩精品一区二区三区视频播放| 免费高清视频精品| 97se亚洲国产综合自在线| 欧美成人一级视频| 全国精品久久少妇| 老司机午夜精品99久久| 99re在线精品| 三级影片在线观看欧美日韩一区二区| 蜜桃精品在线观看| 亚洲激情男女视频| 国产欧美日韩激情| 亚洲一级二级在线| 日本一区二区成人在线| 久久福利视频一区二区| 亚洲欧洲综合另类在线| 高清免费成人av| 亚洲高清在线精品| 九九视频精品免费| 久久精品国产一区二区| 国产精品国产三级国产aⅴ中文| 天堂精品中文字幕在线| 成人av在线一区二区三区| 蜜桃av一区二区三区电影| 高清国产一区二区三区| 国产永久精品大片wwwapp| 日韩—二三区免费观看av| 亚洲激情男女视频| 国产麻豆精品在线| 精品影院一区二区久久久| 在线国产电影不卡| 色爱区综合激月婷婷| 久久久久久久久久久黄色| 欧美一区二区三区精品| 久久精品一区二区三区不卡牛牛| 亚洲一区二区三区美女| 成人黄色av电影| 成人黄色小视频在线观看| 精品国产伦一区二区三区免费| 欧美日韩高清影院| 国产精品久久久久久久久免费相片| 日本大胆欧美人术艺术动态 | 在线欧美日韩精品| 欧美一区二区三区性视频| 亚洲综合在线视频| 久久久久久99久久久精品网站| 日本不卡一区二区| 免费视频一区二区| 欧美日韩久久一区| 欧美色视频在线观看| 亚洲欧美成人一区二区三区| 国产成人综合视频| 精品国产一区二区三区久久久蜜月| 欧美成人三级电影在线| 首页国产欧美日韩丝袜| 成人永久免费视频| 国产亚洲精品aa午夜观看| 青草国产精品久久久久久| 在线播放中文一区| 亚洲午夜三级在线| 日本伦理一区二区| 亚洲男同性恋视频| 99久久精品免费精品国产| 奇米影视一区二区三区| 久久精品99国产精品日本| 在线精品视频免费观看| 国产成人精品影视| 亚洲福利国产精品| 欧美日韩一级二级三级| 亚洲三级小视频| 亚洲一区精品在线| 欧美在线你懂得| 亚洲成人在线观看视频| 亚洲男人的天堂在线观看| 国产精品传媒视频| 中文字幕精品一区二区三区精品| 91黄视频在线观看|