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

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

?? enterkeyhandling.js

?? ajax框架原嗎,dojo目前很流行的,希望大家多多學習啊
?? JS
字號:
if(!dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"] = true;dojo.provide("dijit._editor.plugins.EnterKeyHandling");dojo.declare("dijit._editor.plugins.EnterKeyHandling",null,{	// blockNodeForEnter: String	//		this property decides the behavior of Enter key. It can be either P,	//		DIV, BR, or empty (which means disable this feature). Anything else	//		will trigger errors.	blockNodeForEnter: 'P',	constructor: function(args){		if(args){			dojo.mixin(this,args);		}	},	setEditor: function(editor){		this.editor=editor;		if(this.blockNodeForEnter=='BR'){			if(dojo.isIE){				editor.contentDomPreFilters.push(dojo.hitch(this, "regularPsToSingleLinePs"));				editor.contentDomPostFilters.push(dojo.hitch(this, "singleLinePsToRegularPs"));				editor.onLoadDeferred.addCallback(dojo.hitch(this, "_fixNewLineBehaviorForIE"));			}else{				editor.onLoadDeferred.addCallback(dojo.hitch(this,function(d){					try{						this.editor.document.execCommand("insertBrOnReturn", false, true);					}catch(e){};					return d;				}));			}		}else if(this.blockNodeForEnter){			//add enter key handler			// FIXME: need to port to the new event code!!			dojo['require']('dijit._editor.range');			var h=dojo.hitch(this,this.handleEnterKey);			editor.addKeyHandler(13, 0, h); //enter			editor.addKeyHandler(13, 2, h); //shift+enter			this.connect(this.editor,'onKeyPressed','onKeyPressed');		}	},	connect: function(o,f,tf){		if(!this._connects){			this._connects=[];		}		this._connects.push(dojo.connect(o,f,this,tf));	},	destroy: function(){		dojo.forEach(this._connects,dojo.disconnect);		this._connects=[];	},	onKeyPressed: function(e){		if(this._checkListLater){			if(dojo.withGlobal(this.editor.window, 'isCollapsed', dijit._editor.selection)){				if(!dojo.withGlobal(this.editor.window, 'hasAncestorElement', dijit._editor.selection, ['LI'])){					//circulate the undo detection code by calling RichText::execCommand directly					dijit._editor.RichText.prototype.execCommand.apply(this.editor, ['formatblock',this.blockNodeForEnter]);					//set the innerHTML of the new block node					var block = dojo.withGlobal(this.editor.window, 'getAncestorElement', dijit._editor.selection, [this.blockNodeForEnter])					if(block){						block.innerHTML=this.bogusHtmlContent;						if(dojo.isIE){							//the following won't work, it will move the caret to the last list item in the previous list//							var newrange = dijit.range.create();//							newrange.setStart(block.firstChild,0);//							var selection = dijit.range.getSelection(this.editor.window)//							selection.removeAllRanges();//							selection.addRange(newrange);							//move to the start by move backward one char							var r = this.editor.document.selection.createRange();							r.move('character',-1);							r.select();						}					}else{						alert('onKeyPressed: Can not find the new block node');					}				}			}			this._checkListLater = false;		}else if(this._pressedEnterInBlock){			//the new created is the original current P, so we have previousSibling below			this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);			delete this._pressedEnterInBlock;		}	},	bogusHtmlContent: '&nbsp;',	blockNodes: /^(?:H1|H2|H3|H4|H5|H6|LI)$/,	handleEnterKey: function(e){		// summary: manually handle enter key event to make the behavior consistant across		//	all supported browsers. See property blockNodeForEnter for available options		if(!this.blockNodeForEnter){ return true; } //let browser handle this		if(e.shiftKey  //shift+enter always generates <br>			|| this.blockNodeForEnter=='BR'){			var parent = dojo.withGlobal(this.editor.window, "getParentElement", dijit._editor.selection);			var header = dijit.range.getAncestor(parent,this.editor.blockNodes);			if(header){				if(header.tagName=='LI'){					return true; //let brower handle				}				var selection = dijit.range.getSelection(this.editor.window);				var range = selection.getRangeAt(0);				if(!range.collapsed){					range.deleteContents();				}				if(dijit.range.atBeginningOfContainer(header, range.startContainer, range.startOffset)){					dojo.place(this.editor.document.createElement('br'), header, "before");				}else if(dijit.range.atEndOfContainer(header, range.startContainer, range.startOffset)){					dojo.place(this.editor.document.createElement('br'), header, "after");					var newrange = dijit.range.create();					newrange.setStartAfter(header);					selection.removeAllRanges();					selection.addRange(newrange);				}else{					return true; //let brower handle				}			}else{				//don't change this: do not call this.execCommand, as that may have other logic in subclass				// FIXME				dijit._editor.RichText.prototype.execCommand.call(this.editor, 'inserthtml', '<br>');			}			return false;		}		var _letBrowserHandle = true;		//blockNodeForEnter is either P or DIV		//first remove selection		var selection = dijit.range.getSelection(this.editor.window);		var range = selection.getRangeAt(0);		if(!range.collapsed){			range.deleteContents();		}		var block = dijit.range.getBlockAncestor(range.endContainer, null, this.editor.editNode);		if(block.blockNode && block.blockNode.tagName == 'LI'){			this._checkListLater = true;			return true;		}else{			this._checkListLater = false;		}		//text node directly under body, let's wrap them in a node		if(!block.blockNode){			this.editor.document.execCommand('formatblock',false, this.blockNodeForEnter);			//get the newly created block node			// FIXME			block = {blockNode:dojo.withGlobal(this.editor.window, "getAncestorElement", dijit._editor.selection, [this.blockNodeForEnter]),					blockContainer: this.editor.editNode};			if(block.blockNode){				if((block.blockNode.textContent||block.blockNode.innerHTML).replace(/^\s+|\s+$/g, "").length==0){					this.removeTrailingBr(block.blockNode);					return false;				}			}else{				block.blockNode = this.editor.editNode;			}			selection = dijit.range.getSelection(this.editor.window);			range = selection.getRangeAt(0);		}		var newblock = this.editor.document.createElement(this.blockNodeForEnter);		newblock.innerHTML=this.bogusHtmlContent;		this.removeTrailingBr(block.blockNode);		if(dijit.range.atEndOfContainer(block.blockNode, range.endContainer, range.endOffset)){			if(block.blockNode === block.blockContainer){				block.blockNode.appendChild(newblock);			}else{				dojo.place(newblock, block.blockNode, "after");			}			_letBrowserHandle = false;			//lets move caret to the newly created block			var newrange = dijit.range.create();			newrange.setStart(newblock,0);			selection.removeAllRanges();			selection.addRange(newrange);			if(this.editor.height){				newblock.scrollIntoView(false);			}		}else if(dijit.range.atBeginningOfContainer(block.blockNode,				range.startContainer, range.startOffset)){			if(block.blockNode === block.blockContainer){				dojo.place(newblock, block.blockNode, "first");			}else{				dojo.place(newblock, block.blockNode, "before");			}			if(this.editor.height){				//browser does not scroll the caret position into view, do it manually				newblock.scrollIntoView(false);			}			_letBrowserHandle = false;		}else{ //press enter in the middle of P			if(dojo.isMoz){				//press enter in middle of P may leave a trailing <br/>, let's remove it later				this._pressedEnterInBlock = block.blockNode;			}		}		return _letBrowserHandle;	},	removeTrailingBr: function(container){		if(/P|DIV|LI/i .test(container.tagName)){			var para = container;		}else{			var para = dijit._editor.selection.getParentOfType(container,['P','DIV','LI']);		}		if(!para){ return; }		if(para.lastChild){			if(para.childNodes.length>1 && para.lastChild.nodeType==3 && /^[\s\xAD]*$/ .test(para.lastChild.nodeValue)){				dojo._destroyElement(para.lastChild);			}			if(para.lastChild && para.lastChild.tagName=='BR'){				dojo._destroyElement(para.lastChild);			}		}		if(para.childNodes.length==0){			para.innerHTML=this.bogusHtmlContent;		}	},	_fixNewLineBehaviorForIE: function(d){		if(typeof this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS == "undefined"){			var lineFixingStyles = "p{margin:0 !important;}";			var insertCssText = function(				/*String*/ cssStr,				/*Document*/ doc,				/*String*/ URI)			{				//	summary:				//		Attempt to insert CSS rules into the document through inserting a				//		style element				// DomNode Style  = insertCssText(String ".dojoMenu {color: green;}"[, DomDoc document, dojo.uri.Uri Url ])				if(!cssStr){					return; //	HTMLStyleElement				}				if(!doc){ doc = document; }//					if(URI){// fix paths in cssStr//						cssStr = dojo.html.fixPathsInCssText(cssStr, URI);//					}				var style = doc.createElement("style");				style.setAttribute("type", "text/css");				// IE is b0rken enough to require that we add the element to the doc				// before changing it's properties				var head = doc.getElementsByTagName("head")[0];				if(!head){ // must have a head tag					console.debug("No head tag in document, aborting styles");					return;	//	HTMLStyleElement				}else{					head.appendChild(style);				}				if(style.styleSheet){// IE					var setFunc = function(){						try{							style.styleSheet.cssText = cssStr;						}catch(e){ dojo.debug(e); }					};					if(style.styleSheet.disabled){						setTimeout(setFunc, 10);					}else{						setFunc();					}				}else{ // w3c					var cssText = doc.createTextNode(cssStr);					style.appendChild(cssText);				}				return style;	//	HTMLStyleElement			}			insertCssText(lineFixingStyles, this.editor.document);			this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS = true;			// this.regularPsToSingleLinePs(this.editNode);			return d;		}	},	regularPsToSingleLinePs: function(element, noWhiteSpaceInEmptyP){		function wrapLinesInPs(el){		  // move "lines" of top-level text nodes into ps			function wrapNodes(nodes){				// nodes are assumed to all be siblings				var newP = nodes[0].ownerDocument.createElement('p'); // FIXME: not very idiomatic				nodes[0].parentNode.insertBefore(newP, nodes[0]);				for(var i=0; i<nodes.length; i++){					newP.appendChild(nodes[i]);				}			}			var currentNodeIndex = 0;			var nodesInLine = [];			var currentNode;			while(currentNodeIndex < el.childNodes.length){				currentNode = el.childNodes[currentNodeIndex];				if( (currentNode.nodeName!='BR') &&					(currentNode.nodeType==1) &&					(dojo.style(currentNode, "display")!="block")				){					nodesInLine.push(currentNode);				}else{					// hit line delimiter; process nodesInLine if there are any					var nextCurrentNode = currentNode.nextSibling;					if(nodesInLine.length){						wrapNodes(nodesInLine);						currentNodeIndex = (currentNodeIndex+1)-nodesInLine.length;						if(currentNode.nodeName=="BR"){							dojo._destroyElement(currentNode);						}					}					nodesInLine = [];				}				currentNodeIndex++;			}			if(nodesInLine.length){ wrapNodes(nodesInLine); }		}		function splitP(el){			// split a paragraph into seperate paragraphs at BRs			var currentNode = null;			var trailingNodes = [];			var lastNodeIndex = el.childNodes.length-1;			for(var i=lastNodeIndex; i>=0; i--){				currentNode = el.childNodes[i];				if(currentNode.nodeName=="BR"){					var newP = currentNode.ownerDocument.createElement('p');					dojo.place(newP, el, "after");					if (trailingNodes.length==0 && i != lastNodeIndex) {						newP.innerHTML = "&nbsp;"					}					dojo.forEach(trailingNodes, function(node){						newP.appendChild(node);					});					dojo._destroyElement(currentNode);					trailingNodes = [];				}else{					trailingNodes.unshift(currentNode);				}			}		}		var pList = [];		var ps = element.getElementsByTagName('p');		dojo.forEach(ps, function(p){ pList.push(p); });		dojo.forEach(pList, function(p){			if(	(p.previousSibling) &&				(p.previousSibling.nodeName == 'P' || dojo.style(p.previousSibling, 'display') != 'block')			){				var newP = p.parentNode.insertBefore(this.document.createElement('p'), p);				// this is essential to prevent IE from losing the P.				// if it's going to be innerHTML'd later we need				// to add the &nbsp; to _really_ force the issue				newP.innerHTML = noWhiteSpaceInEmptyP ? "" : "&nbsp;";			}			splitP(p);	  },this.editor);		wrapLinesInPs(element);		return element;	},	singleLinePsToRegularPs: function(element){		function getParagraphParents(node){			var ps = node.getElementsByTagName('p');			var parents = [];			for(var i=0; i<ps.length; i++){				var p = ps[i];				var knownParent = false;				for(var k=0; k < parents.length; k++){					if(parents[k] === p.parentNode){						knownParent = true;						break;					}				}				if(!knownParent){					parents.push(p.parentNode);				}			}			return parents;		}		function isParagraphDelimiter(node){			if(node.nodeType != 1 || node.tagName != 'P'){				return (dojo.style(node, 'display') == 'block');			}else{				if(!node.childNodes.length || node.innerHTML=="&nbsp;"){ return true }				//return node.innerHTML.match(/^(<br\ ?\/?>| |\&nbsp\;)$/i);			}		}		var paragraphContainers = getParagraphParents(element);		for(var i=0; i<paragraphContainers.length; i++){			var container = paragraphContainers[i];			var firstPInBlock = null;			var node = container.firstChild;			var deleteNode = null;			while(node){				if(node.nodeType != "1" || node.tagName != 'P'){					firstPInBlock = null;				}else if (isParagraphDelimiter(node)){					deleteNode = node;					firstPInBlock = null;				}else{					if(firstPInBlock == null){						firstPInBlock = node;					}else{						if( (!firstPInBlock.lastChild || firstPInBlock.lastChild.nodeName != 'BR') &&							(node.firstChild) &&							(node.firstChild.nodeName != 'BR')						){							firstPInBlock.appendChild(this.editor.document.createElement('br'));						}						while(node.firstChild){							firstPInBlock.appendChild(node.firstChild);						}						deleteNode = node;					}				}				node = node.nextSibling;				if(deleteNode){					dojo._destroyElement(deleteNode);					deleteNode = null;				}			}		}		return element;	}});}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品传媒在线观看| 国产一区二区三区四区五区入口| 日本不卡视频在线观看| 国产乱码精品一品二品| 精品视频一区二区三区免费| 久久久噜噜噜久噜久久综合| 日韩国产欧美三级| 色先锋久久av资源部| 欧美tk丨vk视频| 亚洲国产精品欧美一二99| 风间由美一区二区三区在线观看| 91精品免费在线观看| 亚洲综合免费观看高清在线观看| 成人午夜电影久久影院| 精品国产电影一区二区| 日本不卡一二三| 51精品国自产在线| 亚洲精品高清在线| 成人黄色av电影| 国产欧美一区二区精品秋霞影院| 久久精品国产99久久6| 欧美巨大另类极品videosbest | 国产精品77777| 日韩午夜精品电影| 日韩成人av影视| 91精品国产色综合久久不卡电影| 亚洲动漫第一页| 欧美日韩电影在线| 婷婷开心久久网| 5566中文字幕一区二区电影| 婷婷中文字幕一区三区| 欧美理论在线播放| 日韩中文字幕av电影| 欧美精品免费视频| 视频一区中文字幕国产| 67194成人在线观看| 日韩av一二三| 久久综合色8888| 国产精品99久久久| 欧美激情中文字幕| 成人性生交大合| 亚洲欧美日韩成人高清在线一区| 91视视频在线观看入口直接观看www | 91精品久久久久久久91蜜桃| 亚洲成av人片一区二区三区| 欧美精品久久99久久在免费线| 日本v片在线高清不卡在线观看| 欧美不卡一二三| 成人午夜精品在线| 亚洲黄色片在线观看| 欧美日韩视频不卡| 免费av成人在线| 国产午夜精品美女毛片视频| 91丨九色丨蝌蚪富婆spa| 亚洲不卡一区二区三区| 精品va天堂亚洲国产| zzijzzij亚洲日本少妇熟睡| 亚洲最新视频在线观看| 日韩三级在线免费观看| 大胆欧美人体老妇| 亚洲国产日韩一级| 精品国产一二三区| 91麻豆产精品久久久久久| 日韩精品91亚洲二区在线观看| 久久伊人中文字幕| 色偷偷久久一区二区三区| 日本欧美一区二区三区乱码| 亚洲国产精品传媒在线观看| 欧美亚洲丝袜传媒另类| 国产999精品久久久久久绿帽| 亚洲一区二区精品视频| 久久免费美女视频| 欧美日本一区二区| 波多野结衣亚洲| 麻豆91免费看| 亚洲伦在线观看| 久久久久久亚洲综合| 欧美性生活大片视频| 波多野结衣视频一区| 青青草成人在线观看| 亚洲天堂2016| 国产日韩欧美精品综合| 欧美一级免费大片| 色婷婷av久久久久久久| 国产传媒欧美日韩成人| 日韩精品一区第一页| 亚洲视频香蕉人妖| 国产婷婷一区二区| 日韩一级二级三级精品视频| 在线免费不卡电影| 成人黄色av电影| 风流少妇一区二区| 国产一区二区三区国产| 日本亚洲欧美天堂免费| 亚洲国产一区二区三区青草影视| 国产精品网站在线| 久久精品视频一区| 精品福利一区二区三区| 日韩一卡二卡三卡国产欧美| 欧美日韩视频第一区| 欧美伊人久久久久久午夜久久久久| 成人免费视频一区二区| 国内精品不卡在线| 国产在线精品一区在线观看麻豆| 香蕉久久一区二区不卡无毒影院 | 久久久久久免费| 精品国产乱码久久久久久影片| 欧美一区二区三区在线看| 欧美日韩国产大片| 欧美精品第一页| 91精品国产麻豆国产自产在线| 在线视频欧美精品| 欧美日韩一区二区三区在线| 欧美日韩在线播| 欧美伊人精品成人久久综合97| 色婷婷久久一区二区三区麻豆| 色综合欧美在线| 欧美亚一区二区| 欧美一区二区在线视频| 91精品国产乱码久久蜜臀| 91麻豆精品国产| 精品国产91亚洲一区二区三区婷婷| 精品黑人一区二区三区久久 | 风间由美性色一区二区三区| 成人av资源网站| 色综合天天在线| 欧美放荡的少妇| 日韩精品一区二区在线观看| 亚洲精品在线三区| 国产精品国产三级国产专播品爱网| 国产精品久久久久久亚洲伦| 亚洲激情在线激情| 日韩在线一二三区| 国产乱子轮精品视频| 成人免费毛片高清视频| 日本精品裸体写真集在线观看| 欧美专区日韩专区| 日韩三级av在线播放| 国产精品免费丝袜| 午夜一区二区三区视频| 蜜桃视频在线观看一区| 成人午夜激情在线| 欧美日韩国产一级片| 久久精品男人的天堂| 亚洲精品国产精华液| 青青草原综合久久大伊人精品优势| 国产精品亚洲第一区在线暖暖韩国| 91麻豆123| 精品国产免费久久| 亚洲免费观看高清| 蜜桃av噜噜一区| 一本高清dvd不卡在线观看| 日韩欧美www| 日韩理论片一区二区| 欧美aⅴ一区二区三区视频| 成人午夜短视频| 欧美一区二区三区在线观看| 国产精品久久久久9999吃药| 日韩高清不卡一区二区| 成人av在线网| 欧美电影免费观看完整版| **性色生活片久久毛片| 久久91精品国产91久久小草| 在线视频国内一区二区| 精品国产成人在线影院| 亚洲成人激情av| 99久久99久久精品免费看蜜桃| 日韩欧美一级二级三级| 亚洲超碰97人人做人人爱| heyzo一本久久综合| 日韩情涩欧美日韩视频| 亚洲午夜国产一区99re久久| 成人av影视在线观看| www国产精品av| 青青草国产精品亚洲专区无| 欧美图片一区二区三区| 国产精品麻豆久久久| 久久不见久久见中文字幕免费| 欧美午夜精品一区| 亚洲男人的天堂av| 在线免费观看一区| 国产精品日日摸夜夜摸av| 另类小说图片综合网| 欧美一区二区三区免费大片| 亚洲免费在线观看| 99久久精品国产毛片| 久久久www成人免费毛片麻豆 | 日本国产一区二区| 国产精品你懂的| 成人自拍视频在线观看| 国产三级一区二区三区| 国产美女视频91| 久久久久久亚洲综合影院红桃| 九一九一国产精品| 久久嫩草精品久久久精品| 精品一区二区av| 久久精品视频一区二区三区| 国产成人亚洲综合a∨婷婷| 久久精品亚洲乱码伦伦中文 | 国产人成一区二区三区影院|