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

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

?? fckw3crange.js

?? 論壇程序可以實現多人同時交流,jsp + mysql實現的 請大家多多交流
?? JS
字號:
?/*
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
 *
 * This class partially implements the W3C DOM Range for browser that don't
 * support the standards (like IE):
 * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html
 */

var FCKW3CRange = function( parentDocument )
{
	this._Document = parentDocument ;

	this.startContainer	= null ;
	this.startOffset	= null ;
	this.endContainer	= null ;
	this.endOffset		= null ;
	this.collapsed		= true ;
}

FCKW3CRange.CreateRange = function( parentDocument )
{
	// We could opt to use the Range implentation of the browsers. The problem
	// is that every browser have different bugs on their implementations,
	// mostly related to different interpretations of the W3C specifications.
	// So, for now, let's use our implementation and pray for browsers fixings
	// soon. Otherwise will go crazy on trying to find out workarounds.
	/*
	// Get the browser implementation of the range, if available.
	if ( parentDocument.createRange )
	{
		var range = parentDocument.createRange() ;
		if ( typeof( range.startContainer ) != 'undefined' )
			return range ;
	}
	*/
	return new FCKW3CRange( parentDocument ) ;
}

FCKW3CRange.CreateFromRange = function( parentDocument, sourceRange )
{
	var range = FCKW3CRange.CreateRange( parentDocument ) ;
	range.setStart( sourceRange.startContainer, sourceRange.startOffset ) ;
	range.setEnd( sourceRange.endContainer, sourceRange.endOffset ) ;
	return range ;
}

FCKW3CRange.prototype =
{

	_UpdateCollapsed : function()
	{
      this.collapsed = ( this.startContainer == this.endContainer && this.startOffset == this.endOffset ) ;
	},

	// W3C requires a check for the new position. If it is after the end
	// boundary, the range should be collapsed to the new start. It seams we
	// will not need this check for our use of this class so we can ignore it for now.
	setStart : function( refNode, offset )
	{
		this.startContainer	= refNode ;
		this.startOffset	= offset ;

		if ( !this.endContainer )
		{
			this.endContainer	= refNode ;
			this.endOffset		= offset ;
		}

		this._UpdateCollapsed() ;
	},

	// W3C requires a check for the new position. If it is before the start
	// boundary, the range should be collapsed to the new end. It seams we
	// will not need this check for our use of this class so we can ignore it for now.
	setEnd : function( refNode, offset )
	{
		this.endContainer	= refNode ;
		this.endOffset		= offset ;

		if ( !this.startContainer )
		{
			this.startContainer	= refNode ;
			this.startOffset	= offset ;
		}

		this._UpdateCollapsed() ;
	},

	setStartAfter : function( refNode )
	{
		this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ;
	},

	setStartBefore : function( refNode )
	{
		this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ;
	},

	setEndAfter : function( refNode )
	{
		this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ;
	},

	setEndBefore : function( refNode )
	{
		this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ;
	},

	collapse : function( toStart )
	{
		if ( toStart )
		{
			this.endContainer	= this.startContainer ;
			this.endOffset		= this.startOffset ;
		}
		else
		{
			this.startContainer	= this.endContainer ;
			this.startOffset	= this.endOffset ;
		}

		this.collapsed = true ;
	},

	selectNodeContents : function( refNode )
	{
		this.setStart( refNode, 0 ) ;
		this.setEnd( refNode, refNode.nodeType == 3 ? refNode.data.length : refNode.childNodes.length ) ;
	},

	insertNode : function( newNode )
	{
		var startContainer = this.startContainer ;
		var startOffset = this.startOffset ;

		// If we are in a text node.
		if ( startContainer.nodeType == 3 )
		{
			startContainer.splitText( startOffset ) ;

			// Check if it is necessary to update the end boundary.
			if ( startContainer == this.endContainer )
				this.setEnd( startContainer.nextSibling, this.endOffset - this.startOffset ) ;

			// Insert the new node it after the text node.
			FCKDomTools.InsertAfterNode( startContainer, newNode ) ;

			return ;
		}
		else
		{
			// Simply insert the new node before the current start node.
			startContainer.insertBefore( newNode, startContainer.childNodes[ startOffset ] || null ) ;

			// Check if it is necessary to update the end boundary.
			if ( startContainer == this.endContainer )
			{
				this.endOffset++ ;
				this.collapsed = false ;
			}
		}
	},

	deleteContents : function()
	{
		if ( this.collapsed )
			return ;

		this._ExecContentsAction( 0 ) ;
	},

	extractContents : function()
	{
		var docFrag = new FCKDocumentFragment( this._Document ) ;

		if ( !this.collapsed )
			this._ExecContentsAction( 1, docFrag ) ;

		return docFrag ;
	},

	// The selection may be lost when clonning (due to the splitText() call).
	cloneContents : function()
	{
		var docFrag = new FCKDocumentFragment( this._Document ) ;

		if ( !this.collapsed )
			this._ExecContentsAction( 2, docFrag ) ;

		return docFrag ;
	},

	_ExecContentsAction : function( action, docFrag )
	{
		var startNode	= this.startContainer ;
		var endNode		= this.endContainer ;

		var startOffset	= this.startOffset ;
		var endOffset	= this.endOffset ;

		var removeStartNode	= false ;
		var removeEndNode	= false ;

		// Check the start and end nodes and make the necessary removals or changes.

		// Start from the end, otherwise DOM mutations (splitText) made in the
		// start boundary may interfere on the results here.

		// For text containers, we must simply split the node and point to the
		// second part. The removal will be handled by the rest of the code .
		if ( endNode.nodeType == 3 )
			endNode = endNode.splitText( endOffset ) ;
		else
		{
			// If the end container has children and the offset is pointing
			// to a child, then we should start from it.
			if ( endNode.childNodes.length > 0 )
			{
				// If the offset points after the last node.
				if ( endOffset > endNode.childNodes.length - 1 )
				{
					// Let's create a temporary node and mark it for removal.
					endNode = FCKDomTools.InsertAfterNode( endNode.lastChild, this._Document.createTextNode('') ) ;
					removeEndNode = true ;
				}
				else
					endNode = endNode.childNodes[ endOffset ] ;
			}
		}

		// For text containers, we must simply split the node. The removal will
		// be handled by the rest of the code .
		if ( startNode.nodeType == 3 )
		{
			startNode.splitText( startOffset ) ;

			// In cases the end node is the same as the start node, the above
			// splitting will also split the end, so me must move the end to
			// the second part of the split.
			if ( startNode == endNode )
				endNode = startNode.nextSibling ;
		}
		else
		{
			// If the start container has children and the offset is pointing
			// to a child, then we should start from its previous sibling.
			if ( startNode.childNodes.length > 0 &&  startOffset <= startNode.childNodes.length - 1 )
			{
				// If the offset points to the first node, we don't have a
				// sibling, so let's use the first one, but mark it for removal.
				if ( startOffset == 0 )
				{
					// Let's create a temporary node and mark it for removal.
					startNode = startNode.insertBefore( this._Document.createTextNode(''), startNode.firstChild ) ;
					removeStartNode = true ;
				}
				else
					startNode = startNode.childNodes[ startOffset ].previousSibling ;
			}
		}

		// Get the parent nodes tree for the start and end boundaries.
		var startParents	= FCKDomTools.GetParents( startNode ) ;
		var endParents		= FCKDomTools.GetParents( endNode ) ;

		// Compare them, to find the top most siblings.
		var i, topStart, topEnd ;

		for ( i = 0 ; i < startParents.length ; i++ )
		{
			topStart	= startParents[i] ;
			topEnd		= endParents[i] ;

			// The compared nodes will match until we find the top most
			// siblings (different nodes that have the same parent).
			// "i" will hold the index in the parants array for the top
			// most element.
			if ( topStart != topEnd )
				break ;
		}

		var clone, levelStartNode, levelClone, currentNode, currentSibling ;

		if ( docFrag )
			clone = docFrag.RootNode ;

		// Remove all successive sibling nodes for every node in the
		// startParents tree.
		for ( var j = i ; j < startParents.length ; j++ )
		{
			levelStartNode = startParents[j] ;

			// For Extract and Clone, we must clone this level.
			if ( clone && levelStartNode != startNode )		// action = 0 = Delete
				levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == startNode ) ) ;

			currentNode = levelStartNode.nextSibling ;

			while( currentNode )
			{
				// Stop processing when the current node matches a node in the
				// endParents tree or if it is the endNode.
				if ( currentNode == endParents[j] || currentNode == endNode )
					break ;

				// Cache the next sibling.
				currentSibling = currentNode.nextSibling ;

				// If clonning, just clone it.
				if ( action == 2 )	// 2 = Clone
					clone.appendChild( currentNode.cloneNode( true ) ) ;
				else
				{
					// Both Delete and Extract will remove the node.
					currentNode.parentNode.removeChild( currentNode ) ;

					// When Extracting, move the removed node to the docFrag.
					if ( action == 1 )	// 1 = Extract
						clone.appendChild( currentNode ) ;
				}

				currentNode = currentSibling ;
			}

			if ( clone )
				clone = levelClone ;
		}

		if ( docFrag )
			clone = docFrag.RootNode ;

		// Remove all previous sibling nodes for every node in the
		// endParents tree.
		for ( var k = i ; k < endParents.length ; k++ )
		{
			levelStartNode = endParents[k] ;

			// For Extract and Clone, we must clone this level.
			if ( action > 0 && levelStartNode != endNode )		// action = 0 = Delete
				levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == endNode ) ) ;

			// The processing of siblings may have already been done by the parent.
			if ( !startParents[k] || levelStartNode.parentNode != startParents[k].parentNode )
			{
				currentNode = levelStartNode.previousSibling ;

				while( currentNode )
				{
					// Stop processing when the current node matches a node in the
					// startParents tree or if it is the startNode.
					if ( currentNode == startParents[k] || currentNode == startNode )
						break ;

					// Cache the next sibling.
					currentSibling = currentNode.previousSibling ;

					// If clonning, just clone it.
					if ( action == 2 )	// 2 = Clone
						clone.insertBefore( currentNode.cloneNode( true ), clone.firstChild ) ;
					else
					{
						// Both Delete and Extract will remove the node.
						currentNode.parentNode.removeChild( currentNode ) ;

						// When Extracting, mode the removed node to the docFrag.
						if ( action == 1 )	// 1 = Extract
							clone.insertBefore( currentNode, clone.firstChild ) ;
					}

					currentNode = currentSibling ;
				}
			}

			if ( clone )
				clone = levelClone ;
		}

		if ( action == 2 )		// 2 = Clone.
		{
			// No changes in the DOM should be done, so fix the split text (if any).

			var startTextNode = this.startContainer ;
			if ( startTextNode.nodeType == 3 )
			{
				startTextNode.data += startTextNode.nextSibling.data ;
				startTextNode.parentNode.removeChild( startTextNode.nextSibling ) ;
			}

			var endTextNode = this.endContainer ;
			if ( endTextNode.nodeType == 3 && endTextNode.nextSibling )
			{
				endTextNode.data += endTextNode.nextSibling.data ;
				endTextNode.parentNode.removeChild( endTextNode.nextSibling ) ;
			}
		}
		else
		{
			// Collapse the range.

			// If a node has been partially selected, collapse the range between
			// topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs).
			if ( topStart && topEnd && ( startNode.parentNode != topStart.parentNode || endNode.parentNode != topEnd.parentNode ) )
				this.setStart( topEnd.parentNode, FCKDomTools.GetIndexOf( topEnd ) ) ;

			// Collapse it to the start.
			this.collapse( true ) ;
		}

		// Cleanup any marked node.
		if( removeStartNode )
			startNode.parentNode.removeChild( startNode ) ;

		if( removeEndNode && endNode.parentNode )
			endNode.parentNode.removeChild( endNode ) ;
	},

	cloneRange : function()
	{
		return FCKW3CRange.CreateFromRange( this._Document, this ) ;
	},

	toString : function()
	{
		var docFrag = this.cloneContents() ;

		var tmpDiv = this._Document.createElement( 'div' ) ;
		docFrag.AppendTo( tmpDiv ) ;

		return tmpDiv.textContent || tmpDiv.innerText ;
	}
} ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精三区欧美精三区| 欧美日韩一区二区三区不卡| 中文字幕日韩精品一区| 成人美女在线视频| 亚洲一区二区欧美日韩| 精品免费国产一区二区三区四区| 懂色一区二区三区免费观看| 午夜视频一区二区三区| 久久久精品中文字幕麻豆发布| 色欧美片视频在线观看| 欧美aaaaa成人免费观看视频| 国产精品你懂的| 91精品在线免费观看| 成人免费av资源| 久久黄色级2电影| 亚洲一二三四久久| 国产精品免费视频网站| 日韩一级大片在线| 在线观看欧美黄色| 国产91精品久久久久久久网曝门| 日韩精品高清不卡| 亚洲免费av网站| 久久久久久久一区| 337p亚洲精品色噜噜狠狠| 激情欧美一区二区三区在线观看| 亚洲综合色婷婷| 国产精品久久毛片av大全日韩| 欧美一卡在线观看| 欧美亚洲禁片免费| jizzjizzjizz欧美| 美国欧美日韩国产在线播放| 亚洲综合图片区| 亚洲欧美自拍偷拍色图| 久久久久久综合| 欧美在线观看视频一区二区| jlzzjlzz欧美大全| 国产成人午夜片在线观看高清观看| 亚洲美女免费视频| 国产精品日日摸夜夜摸av| 精品国产乱码久久| 91福利资源站| 99re成人精品视频| 北条麻妃一区二区三区| 成人性生交大片免费看中文网站| 激情欧美一区二区三区在线观看| 免费观看日韩电影| 日本欧美久久久久免费播放网| 亚洲成人一区二区| 亚洲亚洲人成综合网络| 一区二区三区日本| 夜夜爽夜夜爽精品视频| 亚洲国产成人va在线观看天堂 | 欧美亚洲高清一区| aaa亚洲精品| 99re66热这里只有精品3直播 | 强制捆绑调教一区二区| 国产精品久久久久久久久快鸭| 国产精品免费观看视频| 欧美激情中文不卡| 国产精品欧美一区喷水| 亚洲国产高清aⅴ视频| 欧美激情一区三区| 精品国产伦一区二区三区免费| 91精品国产综合久久精品| 678五月天丁香亚洲综合网| 精品理论电影在线| 一色桃子久久精品亚洲| 偷拍与自拍一区| 国产精品中文字幕一区二区三区| 波多野结衣欧美| 欧美精品一二三区| 久久婷婷成人综合色| 亚洲欧美另类图片小说| 麻豆久久一区二区| 99久久99久久免费精品蜜臀| 欧美群妇大交群的观看方式| 国产亚洲精品aa午夜观看| 亚洲精品少妇30p| 久久精品国产亚洲a| 99re视频精品| 精品动漫一区二区三区在线观看| 国产精品乱人伦| 日韩精品91亚洲二区在线观看| 国产成人免费视频网站| 在线观看视频91| 久久久久久久久久久黄色| 亚洲线精品一区二区三区八戒| 国产综合色在线| 欧美日韩在线综合| 国产精品免费视频观看| 日本一道高清亚洲日美韩| 成人动漫一区二区三区| 日韩一区二区高清| 亚洲美女淫视频| 国产东北露脸精品视频| 这里只有精品免费| 亚洲日本va在线观看| 国产一区二区三区在线观看免费 | 亚洲国产成人tv| 成人国产视频在线观看| 精品少妇一区二区三区视频免付费| 一区二区三区小说| 成人小视频免费在线观看| 日韩片之四级片| 午夜激情久久久| 91在线视频免费91| 亚洲国产精华液网站w| 久久99精品久久久| 4hu四虎永久在线影院成人| 亚洲黄一区二区三区| 成人免费av资源| 国产欧美视频一区二区| 久久国产精品一区二区| 制服丝袜日韩国产| 亚洲va国产天堂va久久en| 99视频精品全部免费在线| 欧美国产日韩一二三区| 国产原创一区二区| 精品av综合导航| 人妖欧美一区二区| 91精品国产麻豆| 午夜亚洲国产au精品一区二区| 色综合色综合色综合色综合色综合 | 婷婷夜色潮精品综合在线| 91精品办公室少妇高潮对白| 国产精品国模大尺度视频| 成人永久aaa| 国产日韩精品一区| 国产成人在线视频免费播放| ww亚洲ww在线观看国产| 激情丁香综合五月| 久久影院视频免费| 韩国v欧美v亚洲v日本v| 久久女同精品一区二区| 国产一区二区三区电影在线观看| 精品少妇一区二区三区在线播放 | 在线观看亚洲一区| 亚洲自拍偷拍综合| 精品视频免费在线| 视频一区二区三区在线| 欧美一级黄色片| 极品少妇xxxx偷拍精品少妇| 久久这里只有精品视频网| 国产精品18久久久久久vr| 久久久久国产精品人| 成人免费福利片| 亚洲嫩草精品久久| 欧美性受xxxx| 日韩国产精品大片| 久久蜜桃av一区二区天堂| 国产精品一二二区| 国产精品另类一区| 在线国产电影不卡| 男女男精品网站| 国产性天天综合网| 91丝袜美腿高跟国产极品老师| 亚洲一区欧美一区| 91精品国产欧美一区二区18 | 成人综合在线观看| 亚洲色图制服诱惑| 91精品国产福利在线观看| 久久www免费人成看片高清| 欧美极品美女视频| 色欧美片视频在线观看| 毛片av一区二区| 国产精品天美传媒| 欧美天堂亚洲电影院在线播放| 日本在线不卡视频一二三区| 久久夜色精品一区| 在线中文字幕一区二区| 九色综合国产一区二区三区| 中文字幕中文乱码欧美一区二区| 欧美绝品在线观看成人午夜影视| 国内精品写真在线观看| 亚洲卡通欧美制服中文| 精品国产乱码久久久久久图片| 成人精品小蝌蚪| 五月天激情综合网| 久久精品男人的天堂| 欧美性色欧美a在线播放| 国产乱人伦偷精品视频不卡| 一区二区在线观看视频| xfplay精品久久| 欧美性猛片aaaaaaa做受| 国产精品18久久久久久久网站| 亚洲一区二区三区在线看| 久久久www免费人成精品| 欧美日韩一级二级| 不卡高清视频专区| 六月丁香综合在线视频| 亚洲综合小说图片| 国产精品美女久久久久aⅴ国产馆| 欧美精品久久99久久在免费线| 成年人午夜久久久| 麻豆成人在线观看| 亚洲国产成人tv| 亚洲色图一区二区| 欧美激情一区二区三区四区| 91精品国产美女浴室洗澡无遮挡| 日本韩国一区二区三区视频|