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

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

?? ftb-freetextbox.js

?? 嘟嘟文章系統的特點 1.操作簡單
?? 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)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂一区二区在线免费观看| 日韩欧美在线影院| 1区2区3区欧美| 99久久精品情趣| 最近日韩中文字幕| 欧美三级资源在线| 天天综合网天天综合色 | 成人爱爱电影网址| 国产精品天美传媒| 99麻豆久久久国产精品免费 | 精品国产乱码久久| 国产精品一区二区你懂的| 国产亚洲欧洲997久久综合| 高清不卡在线观看av| 中文字幕亚洲在| 欧美综合视频在线观看| 日本三级韩国三级欧美三级| 久久综合视频网| 成人毛片在线观看| 亚洲第一精品在线| 久久精品亚洲乱码伦伦中文| 91蝌蚪porny| 美女被吸乳得到大胸91| 国产欧美精品一区二区三区四区| 91国产视频在线观看| 麻豆国产精品777777在线| 国产精品美女久久久久久| 欧美又粗又大又爽| 久久精品国产亚洲高清剧情介绍| 国产精品毛片a∨一区二区三区 | 97久久久精品综合88久久| 亚洲国产aⅴ天堂久久| 2021国产精品久久精品| 色屁屁一区二区| 久久er精品视频| 亚洲欧美色一区| 精品少妇一区二区三区| 在线观看日韩国产| 盗摄精品av一区二区三区| 午夜精品久久久久久久久| 国产婷婷色一区二区三区| 欧美综合在线视频| 成人午夜视频免费看| 性久久久久久久久久久久| 国产日韩影视精品| 日韩精品自拍偷拍| 在线亚洲一区观看| 成人丝袜18视频在线观看| 久久福利资源站| 亚洲一区二区三区四区在线| 欧美激情一区二区三区蜜桃视频| 3atv一区二区三区| 欧美性感一类影片在线播放| 国产69精品久久777的优势| 蜜臀精品久久久久久蜜臀| 一区二区不卡在线视频 午夜欧美不卡在| 欧美va天堂va视频va在线| 欧美日韩精品一二三区| 色哟哟欧美精品| 99久久99久久精品免费观看| 国产伦精品一区二区三区视频青涩| 亚洲福利一二三区| 亚洲免费色视频| 1024成人网| 国产精品伦一区| 中文在线资源观看网站视频免费不卡| 精品少妇一区二区三区免费观看 | 欧美国产成人精品| 亚洲精品一区二区三区福利| 欧美日本在线播放| 欧美婷婷六月丁香综合色| 色婷婷综合久久久久中文一区二区 | 亚洲免费av观看| 国产精品国产自产拍高清av| 国产日韩av一区| 欧美韩国日本不卡| 亚洲精品一区二区三区在线观看| 日韩一区二区精品在线观看| 9191国产精品| 91精品婷婷国产综合久久| 欧美裸体一区二区三区| 欧美另类z0zxhd电影| 欧美老女人第四色| 欧美一级生活片| 欧美成人综合网站| 精品福利在线导航| 久久精品男人天堂av| 国产片一区二区三区| 国产精品高潮呻吟| 亚洲精品自拍动漫在线| 亚洲一区二区精品视频| 日产欧产美韩系列久久99| 久久av中文字幕片| 国产精品一二三四五| 大胆欧美人体老妇| 91美女精品福利| 欧美少妇一区二区| 制服丝袜av成人在线看| 精品久久一区二区三区| 精品粉嫩超白一线天av| 久久人人97超碰com| 中文字幕免费观看一区| 一区二区三区在线免费| 亚洲成人av电影| 久久se精品一区二区| 高清日韩电视剧大全免费| 成人h精品动漫一区二区三区| 色欧美88888久久久久久影院| 欧美另类一区二区三区| 国产日韩欧美综合在线| 亚洲精品五月天| 免费国产亚洲视频| 成人污污视频在线观看| 在线观看欧美精品| 久久嫩草精品久久久精品| 一色屋精品亚洲香蕉网站| 午夜精彩视频在线观看不卡| 国产精品正在播放| 欧美亚洲一区三区| 精品欧美一区二区久久| 亚洲色图制服丝袜| 韩国一区二区三区| 色播五月激情综合网| 欧美一级片在线看| 亚洲欧美国产77777| 免费观看一级特黄欧美大片| www.久久精品| 欧美tk—视频vk| 亚洲图片自拍偷拍| 国产尤物一区二区在线| 日本韩国欧美国产| 国产三级精品三级| 免费在线观看日韩欧美| 色综合久久天天| 久久精品夜色噜噜亚洲a∨| 午夜激情综合网| 91原创在线视频| 久久婷婷国产综合精品青草| 亚洲成人免费在线| 丁香激情综合五月| 精品国产伦一区二区三区免费 | 欧美日韩一本到| 国产精品另类一区| 麻豆传媒一区二区三区| 欧美影院午夜播放| 亚洲蜜桃精久久久久久久| 国产成人啪午夜精品网站男同| 欧美一级视频精品观看| 一区二区日韩av| 国产伦精品一区二区三区免费| 欧美日韩成人高清| 亚洲精品成人少妇| 成人av综合一区| 国产精品天干天干在观线| 国产呦萝稀缺另类资源| 91麻豆精品国产91久久久| 亚洲成人免费电影| 欧美午夜不卡视频| 亚洲黄网站在线观看| 91免费版在线| 日韩一区在线看| 欧美亚洲动漫精品| 亚洲一区中文在线| 色综合天天综合色综合av| 国产精品女主播在线观看| 国产毛片精品视频| 欧美v国产在线一区二区三区| www..com久久爱| 亚洲一区二区偷拍精品| 欧美日韩精品电影| 成人午夜激情在线| 懂色av中文一区二区三区| 99久久久久久| 日韩经典一区二区| 亚洲精品成人在线| 国产人成亚洲第一网站在线播放| 91黄色免费看| 波多野洁衣一区| 国内久久精品视频| 日韩高清电影一区| 久久国产视频网| 亚洲午夜激情网站| 中文字幕高清不卡| 国产精品免费网站在线观看| 欧美午夜免费电影| 国产一区二区看久久| 亚洲成人你懂的| 成人欧美一区二区三区黑人麻豆| 久久人人超碰精品| 青青草视频一区| 欧美综合一区二区| 精品国产电影一区二区| 久久嫩草精品久久久精品| 国产欧美视频一区二区| 欧美狂野另类xxxxoooo| 成人午夜av电影| 国产成人精品免费看| 国产乱人伦精品一区二区在线观看 | 色综合av在线| 不卡视频一二三四|