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

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

?? fckw3crange.js

?? 強大的個人日志系統,界面華麗
?? JS
字號:
?/*
 * 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 ) ;
	}
} ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av在线资源网站| 在线成人av网站| 在线亚洲免费视频| 精品少妇一区二区三区在线视频| 久久精品这里都是精品| 亚洲一区二区av电影| 国产综合久久久久影院| 欧美性视频一区二区三区| 国产日韩一级二级三级| 麻豆成人91精品二区三区| 欧美亚洲图片小说| 国产精品理伦片| 国产精品羞羞答答xxdd| 日韩一级免费观看| 亚洲一卡二卡三卡四卡 | 亚洲国产高清在线| 久久国产精品99久久久久久老狼| 色94色欧美sute亚洲线路二| 久久久精品影视| 韩国理伦片一区二区三区在线播放| 欧美日韩在线播放一区| 亚洲欧美成人一区二区三区| 成人午夜av电影| 久久久精品tv| 男人的天堂久久精品| 日韩码欧中文字| 丁香婷婷综合五月| 国内成人自拍视频| 精品国产乱码久久久久久1区2区| 色综合久久综合中文综合网| 一区二区三区在线视频观看58| 欧美日韩大陆一区二区| 日本高清成人免费播放| 国产精品国产三级国产a| 91国内精品野花午夜精品| 91精品欧美一区二区三区综合在 | 精品少妇一区二区三区视频免付费| 蜜芽一区二区三区| 精品国精品自拍自在线| 在线亚洲精品福利网址导航| 欧美一区午夜视频在线观看| 伊人色综合久久天天人手人婷| 欧美亚洲国产bt| 日韩欧美国产精品| 91欧美激情一区二区三区成人| 国产精品女同一区二区三区| 成人ar影院免费观看视频| 自拍偷拍国产精品| 欧美性一区二区| 蜜桃视频一区二区三区 | 国产丝袜美腿一区二区三区| 国产精品综合av一区二区国产馆| 久久久国产一区二区三区四区小说| 九色综合狠狠综合久久| 久久久精品免费免费| 成人爱爱电影网址| 亚洲午夜av在线| 26uuu欧美| 91麻豆自制传媒国产之光| 图片区小说区国产精品视频| 日韩欧美你懂的| 成人精品视频一区二区三区| 亚洲精品综合在线| 91精品国产麻豆国产自产在线| 国产一区二区影院| 亚洲精品高清在线| 日韩欧美国产电影| 91首页免费视频| 九九国产精品视频| 亚洲免费资源在线播放| 日韩精品一区在线| av毛片久久久久**hd| 婷婷一区二区三区| 国产精品视频线看| 欧美一区二区免费| 色综合色综合色综合| 麻豆高清免费国产一区| 亚洲精品国产品国语在线app| 欧美一卡2卡3卡4卡| 972aa.com艺术欧美| 久久丁香综合五月国产三级网站 | 成人欧美一区二区三区白人| 一区二区三区小说| 粉嫩av一区二区三区粉嫩| 欧美一区二区黄色| 首页亚洲欧美制服丝腿| 成人精品视频一区二区三区 | 91免费小视频| 在线亚洲一区二区| 久久国产视频网| 亚洲欧美日韩国产综合在线 | 日韩av电影一区| 亚洲精品欧美综合四区| 久久这里只有精品首页| 欧美人与z0zoxxxx视频| 色综合久久中文综合久久牛| 国产激情一区二区三区| 全国精品久久少妇| 亚洲大片免费看| 亚洲最大成人网4388xx| 国产精品麻豆久久久| 精品国产青草久久久久福利| 欧美精品自拍偷拍| 欧美伊人久久久久久午夜久久久久| 国产成人亚洲精品青草天美| 激情综合色综合久久| 蜜桃视频一区二区三区在线观看| 亚洲国产日韩一级| 亚洲与欧洲av电影| 一区二区在线免费| 亚洲色图视频网站| 玉足女爽爽91| 亚洲精品videosex极品| 亚洲人成小说网站色在线| 国产精品久久久久久妇女6080| 久久久久国产成人精品亚洲午夜| 日韩免费视频一区| 亚洲精品在线三区| 2023国产精华国产精品| 亚洲精品一区二区三区影院 | 夜夜爽夜夜爽精品视频| 亚洲精品亚洲人成人网| 一区二区三区**美女毛片| 夜夜嗨av一区二区三区网页| 一区二区三区产品免费精品久久75| 亚洲一卡二卡三卡四卡五卡| 日韩精品成人一区二区在线| 视频在线观看国产精品| 日本美女一区二区三区视频| 免费成人在线观看| 国产九色精品成人porny | 欧美色视频在线| 欧美久久久久久久久| 欧美精品一区二| 中文字幕免费一区| 亚洲一区av在线| 麻豆精品视频在线观看| 国产经典欧美精品| 色素色在线综合| 欧美高清www午色夜在线视频| 日韩欧美久久久| 中文字幕在线不卡一区二区三区| 一区二区三区电影在线播| 美腿丝袜在线亚洲一区| 成人免费视频国产在线观看| 色激情天天射综合网| 日韩一级欧美一级| 在线观看日韩一区| 日韩一区有码在线| 国内精品免费**视频| 国产一区二区三区免费| 麻豆中文一区二区| 国产不卡免费视频| 色婷婷激情综合| 国产亚洲一区二区三区四区| 中文在线资源观看网站视频免费不卡 | 亚洲福中文字幕伊人影院| 欧美日韩一区久久| 亚洲成在线观看| 91麻豆精东视频| 国产校园另类小说区| 亚洲成a人在线观看| 日本高清无吗v一区| 99精品黄色片免费大全| 日本欧美一区二区在线观看| 在线不卡免费av| 亚洲午夜久久久久久久久电影院 | 欧美日韩日日骚| 丝袜美腿亚洲一区| 精品伊人久久久久7777人| 日韩欧美资源站| 国产酒店精品激情| 欧美zozo另类异族| 亚洲欧美日韩国产中文在线| 欧美在线色视频| 欧美视频自拍偷拍| 99这里只有久久精品视频| 美女视频网站黄色亚洲| 午夜精品久久久久久久久久| 日本不卡视频在线观看| 午夜精品久久久久久久99樱桃| 肉丝袜脚交视频一区二区| 午夜天堂影视香蕉久久| 日韩电影在线观看网站| 久久亚洲免费视频| 欧美日韩一区二区在线观看视频| 日本视频免费一区| 国产精品福利影院| 欧美日韩免费观看一区二区三区| 国模少妇一区二区三区| 亚洲免费观看在线观看| 中文字幕va一区二区三区| 国产精品视频九色porn| 中文字幕一区二区在线观看| 亚洲日本va在线观看| 国产欧美精品一区二区三区四区| 欧美视频日韩视频| 色一情一乱一乱一91av| 精品一区二区成人精品| 97久久超碰国产精品电影|