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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ftb-freetextbox.js

?? c#開發(fā)的blog系統(tǒng)
?? 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.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.htmlEditor.value + 
			"</body>" + 
		"</html>");
	this.designEditor.document.close();
	
	
	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';		
	}
	
	// 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.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) {
 	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() {	
	if (!this.initialized) return;
	++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)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩在线播放三区| 欧美videos大乳护士334| 国产精品麻豆一区二区 | 中文av一区二区| 成人激情免费电影网址| 亚洲一级二级三级在线免费观看| 欧美日韩国产一区二区三区地区| 五月天精品一区二区三区| 51精品秘密在线观看| 久久99国内精品| 国产精品拍天天在线| 色综合色综合色综合色综合色综合| 亚洲一区二区三区免费视频| 欧美不卡123| 色呦呦日韩精品| 久久99深爱久久99精品| 亚洲人成网站精品片在线观看| 欧美丝袜丝交足nylons图片| 国产精品99久久不卡二区| 亚洲制服丝袜一区| 国产喂奶挤奶一区二区三区| 欧美亚洲丝袜传媒另类| voyeur盗摄精品| 久久aⅴ国产欧美74aaa| 亚洲一二三四区| 久久久精品综合| 欧美丰满少妇xxxxx高潮对白| 国产中文字幕一区| 美女视频黄a大片欧美| 亚洲欧美日韩在线播放| 久久精品亚洲国产奇米99| 日本精品视频一区二区| 亚洲国产精品成人综合 | 99re这里只有精品视频首页| 亚洲视频一区在线| 在线综合视频播放| 欧美草草影院在线视频| 91精品国产综合久久久久久久| 91亚洲午夜精品久久久久久| 国产不卡高清在线观看视频| 国产a区久久久| 91在线国内视频| 精品视频在线免费观看| 欧美狂野另类xxxxoooo| 精品国产露脸精彩对白| 欧美三级资源在线| 91蜜桃网址入口| 欧美精品亚洲一区二区在线播放| 日韩三级免费观看| 国产精品久久久久久久久晋中| 中文字幕 久热精品 视频在线| 国产精品国产三级国产aⅴ入口 | 亚洲精品一区二区三区香蕉| 国产视频在线观看一区二区三区| 亚洲情趣在线观看| 麻豆成人av在线| 色88888久久久久久影院野外| 3d成人h动漫网站入口| 中文字幕日韩一区| 国产在线视频一区二区| 欧美性高清videossexo| 国产日韩精品视频一区| 日韩中文字幕一区二区三区| gogo大胆日本视频一区| 欧美大黄免费观看| 亚洲bt欧美bt精品777| 91在线精品秘密一区二区| 久久亚洲一级片| 久久av中文字幕片| 欧美成人艳星乳罩| 日韩不卡一区二区| 欧美色图激情小说| 国产精品丝袜在线| 日本美女一区二区| 日韩三区在线观看| 亚洲欧美激情小说另类| 国产乱理伦片在线观看夜一区| 欧美精选在线播放| 轻轻草成人在线| 精品欧美久久久| 成人综合在线观看| 亚洲欧美偷拍三级| 欧美老肥妇做.爰bbww视频| 日本系列欧美系列| 久久综合久久99| 色综合久久99| 天天做天天摸天天爽国产一区| 欧美一区二区播放| 国产成人鲁色资源国产91色综| 国产精品视频第一区| 91浏览器打开| 精品在线免费视频| 亚洲精品国产第一综合99久久 | 午夜亚洲国产au精品一区二区| 色一区在线观看| 国产一区不卡视频| 亚洲成人一区二区在线观看| 日韩精品一区二区三区蜜臀| 成人精品一区二区三区四区 | 中文一区一区三区高中清不卡| 色狠狠桃花综合| 成人午夜电影网站| 蜜桃av噜噜一区二区三区小说| 国产精品久久久久久久久搜平片 | 不卡的看片网站| 久久99精品国产91久久来源| 一区二区成人在线| 国产欧美精品日韩区二区麻豆天美| 色素色在线综合| 国产成人精品免费网站| 青青国产91久久久久久| 亚洲18女电影在线观看| 成人欧美一区二区三区白人 | 日韩极品在线观看| 一区二区三区在线免费| 综合久久给合久久狠狠狠97色| 欧美mv和日韩mv的网站| 欧美v国产在线一区二区三区| 欧美挠脚心视频网站| 欧美日韩国产综合一区二区| 欧美性大战久久久久久久蜜臀| 色视频欧美一区二区三区| 91黄色激情网站| 欧洲一区二区三区免费视频| 欧美亚洲国产一区二区三区| 欧美日韩在线三级| 欧美一激情一区二区三区| 日韩欧美在线不卡| 亚洲国产精品精华液2区45| 中文字幕一区在线观看视频| 亚洲欧美日韩国产中文在线| 亚洲一卡二卡三卡四卡| 韩国中文字幕2020精品| 国产一区二区三区高清播放| 不卡视频在线观看| 91精品福利在线一区二区三区| 日韩一区二区三免费高清| 日本一区二区三区视频视频| 一区二区理论电影在线观看| 日韩成人免费看| 日本高清免费不卡视频| 26uuuu精品一区二区| 亚洲一区二区综合| 成人av在线资源| 精品国产乱码久久久久久久| 亚洲一区二区三区视频在线播放| 日韩激情视频在线观看| 97精品电影院| 国产精品拍天天在线| 激情综合亚洲精品| 91麻豆精品国产综合久久久久久| 亚洲视频一区二区免费在线观看| 欧美aaaaaa午夜精品| 成人永久看片免费视频天堂| 精品女同一区二区| 黄页视频在线91| 精品日本一线二线三线不卡| 日韩不卡一区二区三区| 欧美一级精品大片| 日本不卡视频在线观看| 欧美精品丝袜久久久中文字幕| 亚洲福利视频导航| 欧美久久久久久久久中文字幕| 亚洲成人av电影在线| 欧美老人xxxx18| 日本免费在线视频不卡一不卡二| 欧美色综合天天久久综合精品| 一区二区三区在线视频观看| 在线不卡免费欧美| 国产专区欧美精品| 亚洲精品高清视频在线观看| 色噜噜狠狠成人中文综合| 亚洲午夜久久久久中文字幕久| 色老头久久综合| 尤物av一区二区| 91精品国产色综合久久| 久久精品噜噜噜成人88aⅴ| 欧美国产精品专区| 欧美日免费三级在线| 激情文学综合丁香| 五月综合激情婷婷六月色窝| 亚洲精品一区在线观看| 91高清在线观看| 成人动漫一区二区在线| 亚洲成av人片观看| 国产精品进线69影院| 在线视频综合导航| 91丨porny丨首页| 国产黄色精品网站| 男人的天堂亚洲一区| 亚洲网友自拍偷拍| 一色屋精品亚洲香蕉网站| 国产亚洲婷婷免费| 精品日韩在线观看| 欧美一区二区三区喷汁尤物| 欧美性受xxxx黑人xyx性爽| 91免费国产视频网站| 国产精品亚洲第一区在线暖暖韩国| 免费欧美高清视频| 日本不卡的三区四区五区|