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

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

?? fckw3crange.js

?? 這是一個(gè)BBS系統(tǒng)
?? JS
字號(hào):
?/*
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2008 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 implementation 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 cloning (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 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 if ( startOffset > startNode.childNodes.length - 1 )
			{
				// Let's create a temporary node and mark it for removal.
				startNode = startNode.appendChild( this._Document.createTextNode('') ) ;
				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 parents 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 cloning, 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 cloning, 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 ) )
			{
				var endIndex = FCKDomTools.GetIndexOf( topEnd ) ;

				// If the start node is to be removed, we must correct the
				// index to reflect the removal.
				if ( removeStartNode && topEnd.parentNode == startNode.parentNode )
					endIndex-- ;

				this.setStart( topEnd.parentNode, endIndex ) ;
			}

			// 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 ) ;
	}
} ;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产综合色视频| 日韩视频在线永久播放| 中文字幕av一区二区三区| 日韩国产欧美在线视频| 色婷婷亚洲精品| 亚洲欧洲国产日本综合| 国产91在线看| 国产精品欧美极品| 99久久综合99久久综合网站| 久久精品视频网| 精品一区二区在线视频| 日韩一区二区免费在线电影| 日韩在线观看一区二区| 日韩一区二区三区免费观看| 久久超级碰视频| 久久久无码精品亚洲日韩按摩| 国产精品影视在线观看| 亚洲视频网在线直播| 欧美一区二区三区小说| 伦理电影国产精品| 亚洲国产高清在线| 91精品国产一区二区| 国产精品中文字幕日韩精品| 一区二区三区在线观看视频| 欧洲生活片亚洲生活在线观看| 五月天视频一区| 国产精品久久99| 91精品国产综合久久福利 | 欧美高清dvd| 国产在线视频一区二区| 一区二区成人在线| 久久精品男人的天堂| 欧洲精品在线观看| 成人18视频日本| 日本最新不卡在线| 一区二区激情视频| 中文成人综合网| 欧美tk丨vk视频| 日韩一区和二区| 欧美日韩在线电影| 日本道免费精品一区二区三区| 国产一区在线观看视频| 麻豆精品视频在线观看免费| 一二三区精品福利视频| 亚洲欧美在线观看| 国产精品免费久久久久| 国产色综合一区| 中文字幕在线不卡一区| 精品嫩草影院久久| 日韩美女天天操| 91精品福利在线一区二区三区| 欧美日韩大陆一区二区| 欧美日韩黄色一区二区| 欧美日韩国产123区| 欧美色男人天堂| 日韩欧美一卡二卡| 91超碰这里只有精品国产| 欧美久久免费观看| 精品美女在线观看| 国产精品系列在线| 国产精品嫩草久久久久| ...xxx性欧美| 香蕉成人伊视频在线观看| 免费的成人av| 成a人片国产精品| 欧美在线制服丝袜| 日韩天堂在线观看| 亚洲欧美一区二区视频| 日日嗨av一区二区三区四区| 久久国产成人午夜av影院| 国产成人啪免费观看软件| 亚洲成人在线观看视频| 黑人巨大精品欧美黑白配亚洲| 日韩电影在线看| 亚洲自拍都市欧美小说| 中文字幕在线播放不卡一区| 国产亚洲成aⅴ人片在线观看| 欧美性高清videossexo| 成人蜜臀av电影| 国产在线看一区| 国产露脸91国语对白| 国产精品小仙女| 国产精品一区在线| 99久久久无码国产精品| 一本色道久久加勒比精品| 欧美妇女性影城| 久久久久久久网| 亚洲国产日韩a在线播放性色| 日日骚欧美日韩| 亚洲国产日韩精品| 黄色日韩网站视频| 91小视频在线免费看| 欧美肥妇bbw| ●精品国产综合乱码久久久久| 久久久亚洲精品石原莉奈 | 成人精品一区二区三区中文字幕| 欧美美女黄视频| 香蕉久久一区二区不卡无毒影院| 国产在线视视频有精品| 欧美日本在线一区| 亚洲欧洲日韩综合一区二区| 狠狠色丁香久久婷婷综| 91丨九色丨蝌蚪丨老版| 国产三级精品三级在线专区| 午夜电影网一区| 欧美视频精品在线| 国产精品久久久一区麻豆最新章节| 午夜精品久久久久久久蜜桃app| 色久优优欧美色久优优| 精品久久久久香蕉网| 美国欧美日韩国产在线播放| 欧美性视频一区二区三区| 亚洲欧美日韩国产中文在线| 福利视频网站一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 国产精品久久久久久久久久久免费看 | 天天综合网天天综合色| 在线精品视频小说1| 亚洲高清不卡在线观看| 欧美男人的天堂一二区| 蜜桃视频一区二区| 中文字幕免费观看一区| 欧美影视一区在线| 国产精品国产精品国产专区不蜜| 日韩精品免费视频人成| 97国产一区二区| 亚洲精品国产一区二区三区四区在线| 国产一区二区免费视频| 久久久99精品免费观看不卡| 国产自产视频一区二区三区| 国产亚洲欧美中文| 色哟哟一区二区在线观看| 亚洲国产欧美在线| 亚洲乱码一区二区三区在线观看| 91年精品国产| 青娱乐精品在线视频| 久久久久久免费| 色系网站成人免费| 久久国产婷婷国产香蕉| 中文幕一区二区三区久久蜜桃| 色哟哟亚洲精品| 精品中文av资源站在线观看| 亚洲欧美偷拍卡通变态| 欧美精品少妇一区二区三区| 五月婷婷激情综合网| 国产亚洲美州欧州综合国| 欧美日免费三级在线| 国产在线麻豆精品观看| 一区二区三区美女视频| 日韩精品最新网址| 欧美日韩和欧美的一区二区| www.久久精品| 成人夜色视频网站在线观看| 亚洲午夜私人影院| 日韩一区日韩二区| 日本一区二区久久| www欧美成人18+| 日韩欧美高清在线| 欧美高清性hdvideosex| 色偷偷成人一区二区三区91| 国模无码大尺度一区二区三区| 首页国产欧美久久| 伊人夜夜躁av伊人久久| 国产日韩欧美精品一区| 久久久亚洲精品一区二区三区| 日韩视频一区二区三区在线播放| 色综合久久99| 欧美色网站导航| 欧美性生活大片视频| 欧美日韩一级黄| 91精品一区二区三区在线观看| 欧洲国内综合视频| 欧美日韩国产综合草草| 91麻豆精品国产91久久久久久久久 | 久久精品水蜜桃av综合天堂| 亚洲国产精品ⅴa在线观看| 久久久久久99久久久精品网站| 欧美揉bbbbb揉bbbbb| 91精品国产综合久久久蜜臀粉嫩 | 亚洲黄色av一区| 首页欧美精品中文字幕| 精品一区二区三区在线视频| 国产91在线|亚洲| 在线一区二区三区做爰视频网站| 欧洲精品视频在线观看| 日韩一区二区三区三四区视频在线观看 | 欧美一级免费观看| 国产精品私人影院| 亚洲午夜久久久久久久久电影院 | 日韩欧美高清在线| 国产精品久久久久毛片软件| 爽好久久久欧美精品| 成人在线一区二区三区| 精品视频在线免费看| 久久精品夜色噜噜亚洲aⅴ| 亚洲欧美一区二区三区孕妇| 另类成人小视频在线| 色婷婷久久久久swag精品| 欧美成人精品高清在线播放| 一区二区三区在线免费观看|