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

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

?? fckstyle.js

?? 這個寫的就更好了
?? JS
?? 第 1 頁 / 共 3 頁
字號:
				{
					var attValue = attribs[i][1] ;

					// Remove the attribute if:
					//    - The override definition value is null ;
					//    - The override definition valie is a string that
					//      matches the attribute value exactly.
					//    - The override definition value is a regex that
					//      has matches in the attribute value.
					if ( attValue == null ||
							( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) ||
							attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) )
						return true ;
				}
			}
		}

		return false ;
	},

	/**
	 * Get the style state for an element path. Returns "true" if the element
	 * is active in the path.
	 */
	CheckActive : function( elementPath )
	{
		switch ( this.GetType() )
		{
			case FCK_STYLE_BLOCK :
				return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit, true ) ;

			case FCK_STYLE_INLINE :

				var elements = elementPath.Elements ;

				for ( var i = 0 ; i < elements.length ; i++ )
				{
					var element = elements[i] ;

					if ( element == elementPath.Block || element == elementPath.BlockLimit )
						continue ;

					if ( this.CheckElementRemovable( element, true ) )
						return true ;
				}
		}
		return false ;
	},

	/**
	 * Removes an inline style from inside an element tree. The element node
	 * itself is not checked or removed, only the child tree inside of it.
	 */
	RemoveFromElement : function( element )
	{
		var attribs = this._GetAttribsForComparison() ;
		var overrides = this._GetOverridesForComparison() ;

		// Get all elements with the same name.
		var innerElements = element.getElementsByTagName( this.Element ) ;

		for ( var i = innerElements.length - 1 ; i >= 0 ; i-- )
		{
			var innerElement = innerElements[i] ;

			// Remove any attribute that conflict with this style, no matter
			// their values.
			for ( var att in attribs )
			{
				if ( FCKDomTools.HasAttribute( innerElement, att ) )
				{
					switch ( att )
					{
						case 'style' :
							this._RemoveStylesFromElement( innerElement ) ;
							break ;

						case 'class' :
							// The 'class' element value must match (#1318).
							if ( FCKDomTools.GetAttributeValue( innerElement, att ) != this.GetFinalAttributeValue( att ) )
								continue ;

						default :
							FCKDomTools.RemoveAttribute( innerElement, att ) ;
					}
				}
			}

			// Remove overrides defined to the same element name.
			this._RemoveOverrides( innerElement, overrides[ this.Element ] ) ;

			// Remove the element if no more attributes are available.
			this._RemoveNoAttribElement( innerElement ) ;
		}

		// Now remove any other element with different name that is
		// defined to be overriden.
		for ( var overrideElement in overrides )
		{
			if ( overrideElement != this.Element )
			{
				// Get all elements.
				innerElements = element.getElementsByTagName( overrideElement ) ;

				for ( var i = innerElements.length - 1 ; i >= 0 ; i-- )
				{
					var innerElement = innerElements[i] ;
					this._RemoveOverrides( innerElement, overrides[ overrideElement ] ) ;
					this._RemoveNoAttribElement( innerElement ) ;
				}
			}
		}
	},

	_RemoveStylesFromElement : function( element )
	{
		var elementStyle = element.style.cssText ;
		var pattern = this.GetFinalStyleValue() ;

		if ( elementStyle.length > 0 && pattern.length == 0 )
			return ;

		pattern = '(^|;)\\s*(' +
			pattern.replace( /\s*([^ ]+):.*?(;|$)/g, '$1|' ).replace( /\|$/, '' ) +
			'):[^;]+' ;

		var regex = new RegExp( pattern, 'gi' ) ;

		elementStyle = elementStyle.replace( regex, '' ).Trim() ;

		if ( elementStyle.length == 0 || elementStyle == ';' )
			FCKDomTools.RemoveAttribute( element, 'style' ) ;
		else
			element.style.cssText = elementStyle.replace( regex, '' ) ;
	},

	/**
	 * Remove all attributes that are defined to be overriden,
	 */
	_RemoveOverrides : function( element, override )
	{
		var attributes = override && override.Attributes ;

		if ( attributes )
		{
			for ( var i = 0 ; i < attributes.length ; i++ )
			{
				var attName = attributes[i][0] ;

				if ( FCKDomTools.HasAttribute( element, attName ) )
				{
					var attValue	= attributes[i][1] ;

					// Remove the attribute if:
					//    - The override definition value is null ;
					//    - The override definition valie is a string that
					//      matches the attribute value exactly.
					//    - The override definition value is a regex that
					//      has matches in the attribute value.
					if ( attValue == null ||
							( attValue.test && attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) ) ||
							( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) )
						FCKDomTools.RemoveAttribute( element, attName ) ;
				}
			}
		}
	},

	/**
	 * If the element has no more attributes, remove it.
	 */
	_RemoveNoAttribElement : function( element )
	{
		// If no more attributes remained in the element, remove it,
		// leaving its children.
		if ( !FCKDomTools.HasAttributes( element ) )
		{
			// Removing elements may open points where merging is possible,
			// so let's cache the first and last nodes for later checking.
			var firstChild	= element.firstChild ;
			var lastChild	= element.lastChild ;

			FCKDomTools.RemoveNode( element, true ) ;

			// Check the cached nodes for merging.
			this._MergeSiblings( firstChild ) ;

			if ( firstChild != lastChild )
				this._MergeSiblings( lastChild ) ;
		}
	},

	/**
	 * Creates a DOM element for this style object.
	 */
	BuildElement : function( targetDoc, element )
	{
		// Create the element.
		var el = element || targetDoc.createElement( this.Element ) ;

		// Assign all defined attributes.
		var attribs	= this._StyleDesc.Attributes ;
		var attValue ;
		if ( attribs )
		{
			for ( var att in attribs )
			{
				attValue = this.GetFinalAttributeValue( att ) ;

				if ( att.toLowerCase() == 'class' )
					el.className = attValue ;
				else
					el.setAttribute( att, attValue ) ;
			}
		}

		// Assign the style attribute.
		if ( this._GetStyleText().length > 0 )
			el.style.cssText = this.GetFinalStyleValue() ;

		return el ;
	},

	_CompareAttributeValues : function( attName, valueA, valueB )
	{
		if ( attName == 'style' && valueA && valueB )
		{
			valueA = valueA.replace( /;$/, '' ).toLowerCase() ;
			valueB = valueB.replace( /;$/, '' ).toLowerCase() ;
		}

		// Return true if they match or if valueA is null and valueB is an empty string
		return ( valueA == valueB || ( ( valueA === null || valueA === '' ) && ( valueB === null || valueB === '' ) ) )
	},

	GetFinalAttributeValue : function( attName )
	{
		var attValue = this._StyleDesc.Attributes ;
		var attValue = attValue ? attValue[ attName ] : null ;

		if ( !attValue && attName == 'style' )
			return this.GetFinalStyleValue() ;

		if ( attValue && this._Variables )
			// Using custom Replace() to guarantee the correct scope.
			attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ;

		return attValue ;
	},

	GetFinalStyleValue : function()
	{
		var attValue = this._GetStyleText() ;

		if ( attValue.length > 0 && this._Variables )
		{
			// Using custom Replace() to guarantee the correct scope.
			attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ;
			attValue = FCKTools.NormalizeCssText( attValue ) ;
		}

		return attValue ;
	},

	_GetVariableReplace : function()
	{
		// The second group in the regex is the variable name.
		return this._Variables[ arguments[2] ] || arguments[0] ;
	},

	/**
	 * Set the value of a variable attribute or style, to be used when
	 * appliying the style.
	 */
	SetVariable : function( name, value )
	{
		var variables = this._Variables ;

		if ( !variables )
			variables = this._Variables = {} ;

		this._Variables[ name ] = value ;
	},

	/**
	 * Converting from a PRE block to a non-PRE block in formatting operations.
	 */
	_FromPre : function( doc, block, newBlock )
	{
		var innerHTML = block.innerHTML ;

		// Trim the first and last linebreaks immediately after and before <pre>, </pre>,
		// if they exist.
		// This is done because the linebreaks are not rendered.
		innerHTML = innerHTML.replace( /(\r\n|\r)/g, '\n' ) ;
		innerHTML = innerHTML.replace( /^[ \t]*\n/, '' ) ;
		innerHTML = innerHTML.replace( /\n$/, '' ) ;

		// 1. Convert spaces or tabs at the beginning or at the end to &nbsp;
		innerHTML = innerHTML.replace( /^[ \t]+|[ \t]+$/g, function( match, offset, s )
				{
					if ( match.length == 1 )	// one space, preserve it
						return '&nbsp;' ;
					else if ( offset == 0 )		// beginning of block
						return new Array( match.length ).join( '&nbsp;' ) + ' ' ;
					else				// end of block
						return ' ' + new Array( match.length ).join( '&nbsp;' ) ;
				} ) ;

		// 2. Convert \n to <BR>.
		// 3. Convert contiguous (i.e. non-singular) spaces or tabs to &nbsp;
		var htmlIterator = new FCKHtmlIterator( innerHTML ) ;
		var results = [] ;
		htmlIterator.Each( function( isTag, value )
			{
				if ( !isTag )
				{
					value = value.replace( /\n/g, '<BR>' ) ;
					value = value.replace( /[ \t]{2,}/g,
							function ( match )
							{
								return new Array( match.length ).join( '&nbsp;' ) + ' ' ;
							} ) ;
				}
				results.push( value ) ;
			} ) ;
		newBlock.innerHTML = results.join( '' ) ;
		return newBlock ;
	},

	/**
	 * Converting from a non-PRE block to a PRE block in formatting operations.
	 */
	_ToPre : function( doc, block, newBlock )
	{
		// Handle converting from a regular block to a <pre> block.
		var innerHTML = block.innerHTML.Trim() ;

		// 1. Delete ANSI whitespaces immediately before and after <BR> because they are not visible.
		// 2. Mark down any <BR /> nodes here so they can be turned into \n in the next step and avoid being compressed.
		innerHTML = innerHTML.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '<BR />' ) ;

		// 3. Compress other ANSI whitespaces since they're only visible as one single space previously.
		// 4. Convert &nbsp; to spaces since &nbsp; is no longer needed in <PRE>.
		// 5. Convert any <BR /> to \n. This must not be done earlier because the \n would then get compressed.
		var htmlIterator = new FCKHtmlIterator( innerHTML ) ;
		var results = [] ;
		htmlIterator.Each( function( isTag, value )
			{
				if ( !isTag )
					value = value.replace( /([ \t\n\r]+|&nbsp;)/g, ' ' ) ;
				else if ( isTag && value == '<BR />' )
					value = '\n' ;
				results.push( value ) ;
			} ) ;

		// Assigning innerHTML to <PRE> in IE causes all linebreaks to be reduced to spaces.
		// Assigning outerHTML to <PRE> in IE doesn't work if the <PRE> isn't contained in another node
		// since the node reference is changed after outerHTML assignment.
		// So, we need some hacks to workaround IE bugs here.
		if ( FCKBrowserInfo.IsIE )
		{
			var temp = doc.createElement( 'div' ) ;
			temp.appendChild( newBlock ) ;
			newBlock.outerHTML = '<PRE>\n' + results.join( '' ) + '</PRE>' ;
			newBlock = temp.removeChild( temp.firstChild ) ;
		}
		else
			newBlock.innerHTML = results.join( '' ) ;
		return newBlock ;
	},

	/**
	 * Apply an inline style to a FCKDomRange.
	 *
	 * TODO
	 *	- Implement the "#" style handling.
	 *	- Properly handle block containers like <div> and <blockquote>.
	 */
	_ApplyBlockStyle : function( range, selectIt, updateRange )
	{
		// Bookmark the range so we can re-select it after processing.
		var bookmark ;

		if ( selectIt )
			bookmark = range.CreateBookmark() ;

		var iterator = new FCKDomRangeIterator( range ) ;
		iterator.EnforceRealBlocks = true ;

		var block ;
		var doc = range.Window.document ;

		while( ( block = iterator.GetNextParagraph() ) )		// Only one =
		{
			// Create the new node right before the current one.
			var newBlock = this.BuildElement( doc ) ;

			// Move everything from the current node to the new one.
			var newBlockIsPre = newBlock.nodeName.IEquals( 'pre' ) ;
			var blockIsPre = block.nodeName.IEquals( 'pre' ) ;
			if ( newBlockIsPre && !blockIsPre )
				newBlock = this._ToPre( doc, block, newBlock ) ;
			else if ( !newBlockIsPre && blockIsPre )
				newBlock = this._FromPre( doc, block, newBlock ) ;
			else	// Convering from a regular block to another regular block.
				FCKDomTools.MoveChildren( block, newBlock ) ;

			// Replace the current block.
			block.parentNode.insertBefore( newBlock, block ) ;
			FCKDomTools.RemoveNode( block ) ;
		}

		// Re-select the original range.
		if ( selectIt )
			range.SelectBookmark( bookmark ) ;

		if ( updateRange )
			range.MoveToBookmark( bookmark ) ;
	},

	/**
	 * Apply an inline style to a FCKDomRange.
	 *
	 * TODO
	 *	- Merge elements, when applying styles to similar elements that enclose
	 *    the entire selection, outputing:
	 *        <span style="color: #ff0000; background-color: #ffffff">XYZ</span>
	 *    instead of:
	 *        <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span>
	 */
	_ApplyInlineStyle : function( range, selectIt, updateRange )
	{
		var doc = range.Window.document ;

		if ( range.CheckIsCollapsed() )
		{
			// Create the element to be inserted in the DOM.
			var collapsedElement = this.BuildElement( doc ) ;
			range.InsertNode( collapsedElement ) ;
			range.MoveToPosition( collapsedElement, 2 ) ;
			range.Select() ;

			return ;
		}

		// The general idea here is navigating through all nodes inside the
		// current selection, working on distinct range blocks, defined by the
		// DTD compatibility between the style element and the nodes inside the
		// ranges.
		//
		// For example, suppose we have the following selection (where [ and ]
		// are the boundaries), and we apply a <b> style there:
		//
		//		<p>Here we [have <b>some</b> text.<p>
		//		<p>And some here] here.</p>
		//
		// Two different ranges will be detected:
		//
		//		"have <b>some</b> text."
		//		"And some here"
		//
		// Both ranges will be extracted, moved to a <b> element, and
		// re-inserted, resulting in the following output:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费观看高清完整版在线 | av在线不卡免费看| 麻豆精品在线视频| 亚洲综合视频网| 久久男人中文字幕资源站| 欧美精品精品一区| 欧美四级电影网| 精品视频色一区| 在线精品视频免费播放| 在线观看欧美精品| 在线一区二区三区四区| 成人在线综合网站| 欧美日韩亚洲综合一区| jizzjizzjizz欧美| 色综合一区二区三区| jvid福利写真一区二区三区| 91网址在线看| 欧美亚一区二区| 成人免费看片app下载| 成人av资源在线观看| 丁香婷婷深情五月亚洲| 99久久久无码国产精品| 成人国产精品免费观看| 国产精品一二三区在线| 国产成人高清在线| aaa亚洲精品一二三区| 欧美日韩精品一区二区天天拍小说 | 久久蜜桃香蕉精品一区二区三区| 91精品在线一区二区| 色老汉av一区二区三区| 7777精品伊人久久久大香线蕉的 | 久久久777精品电影网影网 | 99精品视频在线免费观看| 成人久久18免费网站麻豆 | 国产精品色呦呦| 中文无字幕一区二区三区 | 高清不卡在线观看av| 色哟哟国产精品免费观看| 欧美色网站导航| 91丝袜美女网| 日韩一区二区免费高清| 欧美精彩视频一区二区三区| 偷拍日韩校园综合在线| 国内精品视频666| 欧美亚洲尤物久久| 日韩欧美综合在线| 精品捆绑美女sm三区| 亚洲欧美aⅴ...| 日韩精品一二三| 91蜜桃免费观看视频| 91精品国产乱| 亚洲成av人片| 成人一区二区三区| 欧美精品v国产精品v日韩精品| 欧美精品一区在线观看| 亚洲欧美国产高清| 精彩视频一区二区三区| 国产xxx精品视频大全| 欧美中文字幕一区| 久久婷婷久久一区二区三区| 亚洲丝袜自拍清纯另类| 日本怡春院一区二区| 蜜桃av噜噜一区| 精品污污网站免费看| 久久久久国产精品麻豆| 久久99在线观看| 欧美在线你懂得| 一区二区三区小说| 懂色av噜噜一区二区三区av| 精品少妇一区二区三区在线播放| 国产精品久久毛片av大全日韩| 亚洲女子a中天字幕| 成人激情黄色小说| 欧美精品一区二区三区四区| 免费在线一区观看| 91电影在线观看| 亚洲超碰精品一区二区| 91蜜桃网址入口| 亚洲男女一区二区三区| 高清不卡一二三区| 欧美videos中文字幕| 日韩va亚洲va欧美va久久| 色欧美乱欧美15图片| 日韩欧美你懂的| 日韩av不卡一区二区| 成人国产精品免费| 亚洲国产成人在线| 国产成人精品免费网站| 中文字幕亚洲一区二区av在线| 国产精品 日产精品 欧美精品| 国产三级精品三级在线专区| 经典三级在线一区| 国产精品乱码久久久久久| 国产成人免费高清| 亚洲精品视频免费看| 91亚洲国产成人精品一区二区三| 欧美成人激情免费网| 国产在线一区二区| 国产欧美精品区一区二区三区 | 婷婷综合久久一区二区三区| 欧美性一级生活| 日本不卡一区二区三区高清视频| 在线免费观看日韩欧美| 免费人成精品欧美精品| 精品欧美黑人一区二区三区| 国产在线观看免费一区| 久久久99精品久久| 国产在线播放一区| 亚洲免费在线观看| 欧美日韩成人综合| 成人网在线免费视频| 亚洲欧美在线视频| 欧美一区二区三区在线电影| 蜜臀久久99精品久久久久宅男| 国产清纯美女被跳蛋高潮一区二区久久w | 久久精品国产网站| 日本一区二区三区免费乱视频 | 欧美午夜精品久久久| 日韩二区三区在线观看| 精品久久久久久久人人人人传媒 | 国产精品二三区| 欧美性猛交xxxxxxxx| 国产伦精一区二区三区| 中文字幕 久热精品 视频在线 | 另类小说视频一区二区| 国产亚洲欧美色| 欧美蜜桃一区二区三区| 国产精品一区二区三区网站| 婷婷成人综合网| 久久综合九色综合久久久精品综合| 免费在线观看精品| 亚洲一区在线看| 久久影音资源网| 日韩免费电影一区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 国产高清精品在线| 日本免费新一区视频| 136国产福利精品导航| 国产午夜精品一区二区三区视频| av在线播放成人| 国产剧情一区二区| 亚洲国产精品久久久男人的天堂| 中文字幕 久热精品 视频在线 | 91视频国产资源| 国产一区二区成人久久免费影院| 日韩国产精品久久久久久亚洲| 久久久久久久久99精品| 91精品福利在线| 成人精品gif动图一区| 国产精品欧美精品| 国产亚洲1区2区3区| 日韩美女一区二区三区| 7777精品伊人久久久大香线蕉| 99国产精品久久久久久久久久| 国产99久久久久久免费看农村| 美女视频第一区二区三区免费观看网站| 亚洲视频一区在线观看| 国产日韩v精品一区二区| 久久品道一品道久久精品| 欧美一区二区三区日韩视频| 欧美日本一道本在线视频| 色欧美日韩亚洲| 欧美自拍偷拍午夜视频| 色狠狠一区二区三区香蕉| 在线精品视频一区二区三四 | 色婷婷久久久久swag精品| 粉嫩在线一区二区三区视频| 久久精品国产精品青草| 男女男精品视频网| 日韩高清一区二区| 日韩成人精品视频| 午夜精品久久久久久久久久久| 国产精品久久久久7777按摩| 久久久久国产精品麻豆| 欧美国产激情二区三区| 中文字幕综合网| 国产偷国产偷精品高清尤物| 国产欧美一区二区三区鸳鸯浴 | 久久精工是国产品牌吗| 免费在线观看精品| 成人高清免费在线播放| 成人小视频在线| 69av一区二区三区| 91精品欧美综合在线观看最新| 精品国产91亚洲一区二区三区婷婷| 欧美大尺度电影在线| 中文字幕国产一区| 亚洲国产综合91精品麻豆| 久久电影网电视剧免费观看| 久久电影国产免费久久电影 | 色婷婷狠狠综合| 欧美日韩aaaaa| 欧美激情一区二区三区| 亚洲精品日韩一| 国产一区二区不卡在线| 国产成人一区二区精品非洲| 欧美日韩三级在线| 久久久蜜桃精品| 日韩和的一区二区| 国产激情视频一区二区三区欧美 |