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

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

?? fckdomrange.js

?? 這是一個(gè)BBS系統(tǒng)
?? JS
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(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 ==
 *
 * Class for working with a selection range, much like the W3C DOM Range, but
 * it is not intended to be an implementation of the W3C interface.
 */

var FCKDomRange = function( sourceWindow )
{
	this.Window = sourceWindow ;
	this._Cache = {} ;
}

FCKDomRange.prototype =
{

	_UpdateElementInfo : function()
	{
		var innerRange = this._Range ;

		if ( !innerRange )
			this.Release( true ) ;
		else
		{
			// For text nodes, the node itself is the StartNode.
			var eStart	= innerRange.startContainer ;

			var oElementPath = new FCKElementPath( eStart ) ;
			this.StartNode			= eStart.nodeType == 3 ? eStart : eStart.childNodes[ innerRange.startOffset ] ;
			this.StartContainer		= eStart ;
			this.StartBlock			= oElementPath.Block ;
			this.StartBlockLimit	= oElementPath.BlockLimit ;

			if ( innerRange.collapsed )
			{
				this.EndNode		= this.StartNode ;
				this.EndContainer	= this.StartContainer ;
				this.EndBlock		= this.StartBlock ;
				this.EndBlockLimit	= this.StartBlockLimit ;
			}
			else
			{
				var eEnd	= innerRange.endContainer ;

				if ( eStart != eEnd )
					oElementPath = new FCKElementPath( eEnd ) ;

				// The innerRange.endContainer[ innerRange.endOffset ] is not
				// usually part of the range, but the marker for the range end. So,
				// let's get the previous available node as the real end.
				var eEndNode = eEnd ;
				if ( innerRange.endOffset == 0 )
				{
					while ( eEndNode && !eEndNode.previousSibling )
						eEndNode = eEndNode.parentNode ;

					if ( eEndNode )
						eEndNode = eEndNode.previousSibling ;
				}
				else if ( eEndNode.nodeType == 1 )
					eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ;

				this.EndNode			= eEndNode ;
				this.EndContainer		= eEnd ;
				this.EndBlock			= oElementPath.Block ;
				this.EndBlockLimit		= oElementPath.BlockLimit ;
			}
		}

		this._Cache = {} ;
	},

	CreateRange : function()
	{
		return new FCKW3CRange( this.Window.document ) ;
	},

	DeleteContents : function()
	{
		if ( this._Range )
		{
			this._Range.deleteContents() ;
			this._UpdateElementInfo() ;
		}
	},

	ExtractContents : function()
	{
		if ( this._Range )
		{
			var docFrag = this._Range.extractContents() ;
			this._UpdateElementInfo() ;
			return docFrag ;
		}
		return null ;
	},

	CheckIsCollapsed : function()
	{
		if ( this._Range )
			return this._Range.collapsed ;

		return false ;
	},

	Collapse : function( toStart )
	{
		if ( this._Range )
			this._Range.collapse( toStart ) ;

		this._UpdateElementInfo() ;
	},

	Clone : function()
	{
		var oClone = FCKTools.CloneObject( this ) ;

		if ( this._Range )
			oClone._Range = this._Range.cloneRange() ;

		return oClone ;
	},

	MoveToNodeContents : function( targetNode )
	{
		if ( !this._Range )
			this._Range = this.CreateRange() ;

		this._Range.selectNodeContents( targetNode ) ;

		this._UpdateElementInfo() ;
	},

	MoveToElementStart : function( targetElement )
	{
		this.SetStart(targetElement,1) ;
		this.SetEnd(targetElement,1) ;
	},

	// Moves to the first editing point inside a element. For example, in a
	// element tree like "<p><b><i></i></b> Text</p>", the start editing point
	// is "<p><b><i>^</i></b> Text</p>" (inside <i>).
	MoveToElementEditStart : function( targetElement )
	{
		var editableElement ;

		while ( targetElement && targetElement.nodeType == 1 )
		{
			if ( FCKDomTools.CheckIsEditable( targetElement ) )
				editableElement = targetElement ;
			else if ( editableElement )
				break ;		// If we already found an editable element, stop the loop.

			targetElement = targetElement.firstChild ;
		}

		if ( editableElement )
			this.MoveToElementStart( editableElement ) ;
	},

	InsertNode : function( node )
	{
		if ( this._Range )
			this._Range.insertNode( node ) ;
	},

	CheckIsEmpty : function()
	{
		if ( this.CheckIsCollapsed() )
			return true ;

		// Inserts the contents of the range in a div tag.
		var eToolDiv = this.Window.document.createElement( 'div' ) ;
		this._Range.cloneContents().AppendTo( eToolDiv ) ;

		FCKDomTools.TrimNode( eToolDiv ) ;

		return ( eToolDiv.innerHTML.length == 0 ) ;
	},

	/**
	 * Checks if the start boundary of the current range is "visually" (like a
	 * selection caret) at the beginning of the block. It means that some
	 * things could be brefore the range, like spaces or empty inline elements,
	 * but it would still be considered at the beginning of the block.
	 */
	CheckStartOfBlock : function()
	{
		var cache = this._Cache ;
		var bIsStartOfBlock = cache.IsStartOfBlock ;

		if ( bIsStartOfBlock != undefined )
			return bIsStartOfBlock ;

		// Take the block reference.
		var block = this.StartBlock || this.StartBlockLimit ;

		var container	= this._Range.startContainer ;
		var offset		= this._Range.startOffset ;
		var currentNode ;

		if ( offset > 0 )
		{
			// First, check the start container. If it is a text node, get the
			// substring of the node value before the range offset.
			if ( container.nodeType == 3 )
			{
				var textValue = container.nodeValue.substr( 0, offset ).Trim() ;

				// If we have some text left in the container, we are not at
				// the end for the block.
				if ( textValue.length != 0 )
					return cache.IsStartOfBlock = false ;
			}
			else
				currentNode = container.childNodes[ offset - 1 ] ;
		}

		// We'll not have a currentNode if the container was a text node, or
		// the offset is zero.
		if ( !currentNode )
			currentNode = FCKDomTools.GetPreviousSourceNode( container, true, null, block ) ;

		while ( currentNode )
		{
			switch ( currentNode.nodeType )
			{
				case 1 :
					// It's not an inline element.
					if ( !FCKListsLib.InlineChildReqElements[ currentNode.nodeName.toLowerCase() ] )
						return cache.IsStartOfBlock = false ;

					break ;

				case 3 :
					// It's a text node with real text.
					if ( currentNode.nodeValue.Trim().length > 0 )
						return cache.IsStartOfBlock = false ;
			}

			currentNode = FCKDomTools.GetPreviousSourceNode( currentNode, false, null, block ) ;
		}

		return cache.IsStartOfBlock = true ;
	},

	/**
	 * Checks if the end boundary of the current range is "visually" (like a
	 * selection caret) at the end of the block. It means that some things
	 * could be after the range, like spaces, empty inline elements, or a
	 * single <br>, but it would still be considered at the end of the block.
	 */
	CheckEndOfBlock : function( refreshSelection )
	{
		var isEndOfBlock = this._Cache.IsEndOfBlock ;

		if ( isEndOfBlock != undefined )
			return isEndOfBlock ;

		// Take the block reference.
		var block = this.EndBlock || this.EndBlockLimit ;

		var container	= this._Range.endContainer ;
		var offset			= this._Range.endOffset ;
		var currentNode ;

		// First, check the end container. If it is a text node, get the
		// substring of the node value after the range offset.
		if ( container.nodeType == 3 )
		{
			var textValue = container.nodeValue ;
			if ( offset < textValue.length )
			{
				textValue = textValue.substr( offset ) ;

				// If we have some text left in the container, we are not at
				// the end for the block.
				if ( textValue.Trim().length != 0 )
					return this._Cache.IsEndOfBlock = false ;
			}
		}
		else
			currentNode = container.childNodes[ offset ] ;

		// We'll not have a currentNode if the container was a text node, of
		// the offset is out the container children limits (after it probably).
		if ( !currentNode )
			currentNode = FCKDomTools.GetNextSourceNode( container, true, null, block ) ;

		var hadBr = false ;

		while ( currentNode )
		{
			switch ( currentNode.nodeType )
			{
				case 1 :
					var nodeName = currentNode.nodeName.toLowerCase() ;

					// It's an inline element.
					if ( FCKListsLib.InlineChildReqElements[ nodeName ] )
						break ;

					// It is the first <br> found.
					if ( nodeName == 'br' && !hadBr )
					{
						hadBr = true ;
						break ;
					}

					return this._Cache.IsEndOfBlock = false ;

				case 3 :
					// It's a text node with real text.
					if ( currentNode.nodeValue.Trim().length > 0 )
						return this._Cache.IsEndOfBlock = false ;
			}

			currentNode = FCKDomTools.GetNextSourceNode( currentNode, false, null, block ) ;
		}

		if ( refreshSelection )
			this.Select() ;

		return this._Cache.IsEndOfBlock = true ;
	},

	// This is an "intrusive" way to create a bookmark. It includes <span> tags
	// in the range boundaries. The advantage of it is that it is possible to
	// handle DOM mutations when moving back to the bookmark.
	// Attention: the inclusion of nodes in the DOM is a design choice and
	// should not be changed as there are other points in the code that may be
	// using those nodes to perform operations. See GetBookmarkNode.
	// For performance, includeNodes=true if intended to SelectBookmark.
	CreateBookmark : function( includeNodes )
	{
		// Create the bookmark info (random IDs).
		var oBookmark =
		{
			StartId	: (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'S',
			EndId	: (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'E'
		} ;

		var oDoc = this.Window.document ;
		var eStartSpan ;
		var eEndSpan ;
		var oClone ;

		// For collapsed ranges, add just the start marker.
		if ( !this.CheckIsCollapsed() )
		{
			eEndSpan = oDoc.createElement( 'span' ) ;
			eEndSpan.style.display = 'none' ;
			eEndSpan.id = oBookmark.EndId ;
			eEndSpan.setAttribute( '_fck_bookmark', true ) ;

			// For IE, it must have something inside, otherwise it may be
			// removed during DOM operations.
//			if ( FCKBrowserInfo.IsIE )
				eEndSpan.innerHTML = '&nbsp;' ;

			oClone = this.Clone() ;
			oClone.Collapse( false ) ;
			oClone.InsertNode( eEndSpan ) ;
		}

		eStartSpan = oDoc.createElement( 'span' ) ;
		eStartSpan.style.display = 'none' ;
		eStartSpan.id = oBookmark.StartId ;
		eStartSpan.setAttribute( '_fck_bookmark', true ) ;

		// For IE, it must have something inside, otherwise it may be removed
		// during DOM operations.
//		if ( FCKBrowserInfo.IsIE )
			eStartSpan.innerHTML = '&nbsp;' ;

		oClone = this.Clone() ;
		oClone.Collapse( true ) ;
		oClone.InsertNode( eStartSpan ) ;

		if ( includeNodes )
		{
			oBookmark.StartNode = eStartSpan ;
			oBookmark.EndNode = eEndSpan ;
		}

		// Update the range position.
		if ( eEndSpan )
		{
			this.SetStart( eStartSpan, 4 ) ;
			this.SetEnd( eEndSpan, 3 ) ;
		}
		else
			this.MoveToPosition( eStartSpan, 4 ) ;

		return oBookmark ;
	},

	// This one should be a part of a hypothetic "bookmark" object.
	GetBookmarkNode : function( bookmark, start )
	{
		var doc = this.Window.document ;

		if ( start )
			return bookmark.StartNode || doc.getElementById( bookmark.StartId ) ;
		else
			return bookmark.EndNode || doc.getElementById( bookmark.EndId ) ;
	},

	MoveToBookmark : function( bookmark, preserveBookmark )
	{
		var eStartSpan	= this.GetBookmarkNode( bookmark, true ) ;
		var eEndSpan	= this.GetBookmarkNode( bookmark, false ) ;

		this.SetStart( eStartSpan, 3 ) ;

		if ( !preserveBookmark )
			FCKDomTools.RemoveNode( eStartSpan ) ;

		// If collapsed, the end span will not be available.
		if ( eEndSpan )
		{
			this.SetEnd( eEndSpan, 3 ) ;

			if ( !preserveBookmark )
				FCKDomTools.RemoveNode( eEndSpan ) ;
		}
		else
			this.Collapse( true ) ;

		this._UpdateElementInfo() ;
	},

	// Non-intrusive bookmark algorithm
	CreateBookmark2 : function()
	{
		// If there is no range then get out of here.
		// It happens on initial load in Safari #962 and if the editor it's hidden also in Firefox
		if ( ! this._Range )
			return { "Start" : 0, "End" : 0 } ;

		// First, we record down the offset values
		var bookmark =
		{
			"Start" : [ this._Range.startOffset ],
			"End" : [ this._Range.endOffset ]
		} ;
		// Since we're treating the document tree as normalized, we need to backtrack the text lengths
		// of previous text nodes into the offset value.
		var curStart = this._Range.startContainer.previousSibling ;
		var curEnd = this._Range.endContainer.previousSibling ;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲成人av每日更新| 蜜臀av一区二区三区| 国产精品久久久久久久久免费丝袜| 日本特黄久久久高潮| 一本大道av一区二区在线播放| 日韩三区在线观看| 国产日韩一级二级三级| 一区二区三区鲁丝不卡| 九九国产精品视频| 欧美中文字幕亚洲一区二区va在线| 欧美精品日韩精品| 一区在线观看免费| 蜜臀久久99精品久久久画质超高清| 粉嫩aⅴ一区二区三区四区五区 | 在线观看成人免费视频| 色婷婷狠狠综合| 久久综合九色综合久久久精品综合| 亚洲欧洲国产日韩| 国内精品视频666| 在线影院国内精品| 欧美国产精品劲爆| 亚洲国产中文字幕在线视频综合| 国产一区二区伦理片| 欧美美女直播网站| 亚洲欧美成人一区二区三区| 韩国一区二区在线观看| 欧洲一区在线电影| 国产精品久久久久婷婷| 国内精品久久久久影院色| 91精品国产综合久久香蕉的特点| 一级日本不卡的影视| 99re成人精品视频| 亚洲国产精品久久一线不卡| 91麻豆精品国产91久久久久久久久 | 国产激情91久久精品导航| 欧美刺激午夜性久久久久久久| 午夜精品一区二区三区电影天堂 | 免费的成人av| wwww国产精品欧美| 高清成人在线观看| 国产日本欧美一区二区| 国产91露脸合集magnet| 国产精品国产自产拍高清av王其| 国产精品一二三在| 国产精品久线在线观看| 91污在线观看| 偷拍亚洲欧洲综合| 精品久久久久一区| 一本色道久久综合精品竹菊| 无吗不卡中文字幕| 久久久亚洲欧洲日产国码αv| 国产a区久久久| 一级日本不卡的影视| 欧美一区2区视频在线观看| 麻豆91精品91久久久的内涵| 久久精品欧美一区二区三区麻豆 | 欧美日韩第一区日日骚| 美女任你摸久久| 日本一二三不卡| 欧美精品一卡两卡| 国产91在线|亚洲| 亚洲国产精品一区二区尤物区| 欧美日韩卡一卡二| 国产精品亚洲视频| 一区二区三区 在线观看视频| 日韩一级片网站| 色欧美片视频在线观看在线视频| 免费成人在线观看| 亚洲综合在线视频| 国产精品电影一区二区三区| 日韩一区二区视频| 欧美成人欧美edvon| a在线播放不卡| 国产乱码精品一区二区三| 污片在线观看一区二区| 亚洲精品欧美在线| 中文字幕国产精品一区二区| 欧美mv日韩mv亚洲| 欧美日韩精品综合在线| 成人av在线网| 成人精品在线视频观看| 中文字幕字幕中文在线中不卡视频| 久久天天做天天爱综合色| 欧美一区二区三区免费大片| 欧美色综合网站| 欧美特级限制片免费在线观看| 91日韩在线专区| 99精品偷自拍| 99精品一区二区三区| 99国产精品久久久久久久久久久| 粉嫩蜜臀av国产精品网站| 国产资源精品在线观看| 麻豆精品蜜桃视频网站| 欧美日韩国产片| 日韩欧美色综合| 久久久精品影视| 国产精品久久久久久久午夜片| 国产精品进线69影院| 亚洲精品大片www| 午夜精品一区二区三区电影天堂| 首页国产丝袜综合| 久久国产精品露脸对白| 国产乱子伦视频一区二区三区| 国内精品国产成人国产三级粉色| 国产成人日日夜夜| 91蜜桃在线免费视频| 欧美日韩国产另类不卡| 精品免费视频.| 亚洲欧美综合网| 日韩激情av在线| 国产91色综合久久免费分享| 91亚洲大成网污www| 91精品一区二区三区在线观看| 日韩欧美国产wwwww| 亚洲精品成人精品456| 青青草97国产精品免费观看| 国产成人激情av| 7777精品伊人久久久大香线蕉经典版下载| 亚洲欧美偷拍卡通变态| 亚洲h在线观看| caoporn国产一区二区| 久久亚洲综合色| 日韩精品亚洲专区| 成人av一区二区三区| 精品国偷自产国产一区| 一区二区三区成人在线视频| 成人性色生活片| 久久久影视传媒| 久久福利视频一区二区| 欧美在线观看视频一区二区三区| 国产精品福利av| 成人国产亚洲欧美成人综合网| 欧美电影免费观看完整版| 无码av免费一区二区三区试看| 一本到高清视频免费精品| 国产亲近乱来精品视频| 国产精品一区免费视频| 欧美mv日韩mv国产网站| 奇米精品一区二区三区在线观看| 欧美日韩和欧美的一区二区| 亚洲最大色网站| 在线观看亚洲精品| 亚洲国产婷婷综合在线精品| 色综合婷婷久久| 亚洲美女电影在线| 91精品1区2区| 亚洲一区二区三区爽爽爽爽爽 | 欧美另类变人与禽xxxxx| 亚洲国产精品久久人人爱蜜臀 | 欧美色爱综合网| 亚洲永久精品国产| 欧美性大战久久久| 日韩精品1区2区3区| 欧美精品一区二区久久久| 国产麻豆精品在线| 夜夜精品视频一区二区| 色狠狠av一区二区三区| 日本午夜一本久久久综合| 久久久99久久| 在线视频综合导航| 美女脱光内衣内裤视频久久网站| 26uuu国产在线精品一区二区| 国产精品一区二区在线观看不卡 | 亚洲欧美一区二区三区国产精品| 色婷婷综合在线| 美国av一区二区| 亚洲色图视频免费播放| 欧美日韩日日摸| 不卡的av中国片| 美女www一区二区| 国产精品私房写真福利视频| 91精品免费在线| 成人精品鲁一区一区二区| 亚洲一区电影777| 欧美国产激情二区三区| 日韩一区二区三区视频| 国产91综合网| 久久国产三级精品| 亚洲午夜精品久久久久久久久| 国产欧美日韩视频一区二区 | 久久精品一区二区三区不卡| 欧美在线999| 成人白浆超碰人人人人| 精品一区二区三区的国产在线播放| 亚洲精品国产高清久久伦理二区| 精品国产三级a在线观看| 欧美久久久久久蜜桃| 色婷婷av一区二区三区gif| 成人激情动漫在线观看| 国产91在线观看| 国产真实精品久久二三区| 日韩电影网1区2区| 日韩—二三区免费观看av| 亚洲国产sm捆绑调教视频| 国产精品理伦片| 一色屋精品亚洲香蕉网站| 中文字幕一区二区三中文字幕| 亚洲国产成人一区二区三区| 国产目拍亚洲精品99久久精品| 国产日韩亚洲欧美综合|