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

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

?? fckeditingarea.js

?? 強大的個人日志系統(tǒng),界面華麗
?? 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 ==
 *
 * FCKEditingArea Class: renders an editable area.
 */

/**
 * @constructor
 * @param {String} targetElement The element that will hold the editing area. Any child element present in the target will be deleted.
 */
var FCKEditingArea = function( targetElement )
{
	this.TargetElement = targetElement ;
	this.Mode = FCK_EDITMODE_WYSIWYG ;

	if ( FCK.IECleanup )
		FCK.IECleanup.AddItem( this, FCKEditingArea_Cleanup ) ;
}


/**
 * @param {String} html The complete HTML for the page, including DOCTYPE and the <html> tag.
 */
FCKEditingArea.prototype.Start = function( html, secondCall )
{
	var eTargetElement	= this.TargetElement ;
	var oTargetDocument	= FCKTools.GetElementDocument( eTargetElement ) ;

	// Remove all child nodes from the target.
	while( eTargetElement.firstChild )
		eTargetElement.removeChild( eTargetElement.firstChild ) ;

	if ( this.Mode == FCK_EDITMODE_WYSIWYG )
	{
		// For FF, document.domain must be set only when different, otherwhise
		// we'll strangely have "Permission denied" issues.
		if ( FCK_IS_CUSTOM_DOMAIN )
			html = '<script>document.domain="' + FCK_RUNTIME_DOMAIN + '";</script>' + html ;

		// IE has a bug with the <base> tag... it must have a </base> closer,
		// otherwise the all successive tags will be set as children nodes of the <base>.
		if ( FCKBrowserInfo.IsIE )
			html = html.replace( /(<base[^>]*?)\s*\/?>(?!\s*<\/base>)/gi, '$1></base>' ) ;
		else if ( !secondCall )
		{
			// Gecko moves some tags out of the body to the head, so we must use
			// innerHTML to set the body contents (SF BUG 1526154).

			// Extract the BODY contents from the html.
			var oMatchBefore = html.match( FCKRegexLib.BeforeBody ) ;
			var oMatchAfter = html.match( FCKRegexLib.AfterBody ) ;

			if ( oMatchBefore && oMatchAfter )
			{
				var sBody = html.substr( oMatchBefore[1].length,
					       html.length - oMatchBefore[1].length - oMatchAfter[1].length ) ;	// This is the BODY tag contents.

				html =
					oMatchBefore[1] +			// This is the HTML until the <body...> tag, inclusive.
					'&nbsp;' +
					oMatchAfter[1] ;			// This is the HTML from the </body> tag, inclusive.

				// If nothing in the body, place a BOGUS tag so the cursor will appear.
				if ( FCKBrowserInfo.IsGecko && ( sBody.length == 0 || FCKRegexLib.EmptyParagraph.test( sBody ) ) )
					sBody = '<br type="_moz">' ;

				this._BodyHTML = sBody ;

			}
			else
				this._BodyHTML = html ;			// Invalid HTML input.
		}

		// Create the editing area IFRAME.
		var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;

		// IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
		// See #1055.
		var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ;

		oIFrame.frameBorder = 0 ;
		oIFrame.style.width = oIFrame.style.height = '100%' ;

		if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE )
		{
			window._FCKHtmlToLoad = html.replace( /<head>/i, '<head>' + sOverrideError ) ;
			oIFrame.src = 'javascript:void( (function(){' +
				'document.open() ;' +
				'document.domain="' + document.domain + '" ;' +
				'document.write( window.parent._FCKHtmlToLoad );' +
				'document.close() ;' +
				'window.parent._FCKHtmlToLoad = null ;' +
				'})() )' ;
		}
		else if ( !FCKBrowserInfo.IsGecko )
		{
			// Firefox will render the tables inside the body in Quirks mode if the
			// source of the iframe is set to javascript. see #515
			oIFrame.src = 'javascript:void(0)' ;
		}

		// Append the new IFRAME to the target. For IE, it must be done after
		// setting the "src", to avoid the "secure/unsecure" message under HTTPS.
		eTargetElement.appendChild( oIFrame ) ;

		// Get the window and document objects used to interact with the newly created IFRAME.
		this.Window = oIFrame.contentWindow ;

		// IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
		// TODO: This error handler is not being fired.
		// this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }

		if ( !FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE )
		{
			var oDoc = this.Window.document ;

			oDoc.open() ;
			oDoc.write( html.replace( /<head>/i, '<head>' + sOverrideError ) ) ;
			oDoc.close() ;
		}

		if ( FCKBrowserInfo.IsAIR )
			FCKAdobeAIR.EditingArea_Start( oDoc, html ) ;

		// Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it
		// will magically work.
		if ( FCKBrowserInfo.IsGecko10 && !secondCall )
		{
			this.Start( html, true ) ;
			return ;
		}

		if ( oIFrame.readyState && oIFrame.readyState != 'completed' )
		{
			var editArea = this ;

			// Using a IE alternative for DOMContentLoaded, similar to the
			// solution proposed at http://javascript.nwbox.com/IEContentLoaded/
			setTimeout( function()
					{
						try
						{
							editArea.Window.document.documentElement.doScroll("left") ;
						}
						catch(e)
						{
							setTimeout( arguments.callee, 0 ) ;
							return ;
						}
						editArea.Window._FCKEditingArea = editArea ;
						FCKEditingArea_CompleteStart.call( editArea.Window ) ;
					}, 0 ) ;
		}
		else
		{
			this.Window._FCKEditingArea = this ;

			// FF 1.0.x is buggy... we must wait a lot to enable editing because
			// sometimes the content simply disappears, for example when pasting
			// "bla1!<img src='some_url'>!bla2" in the source and then switching
			// back to design.
			if ( FCKBrowserInfo.IsGecko10 )
				this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ;
			else
				FCKEditingArea_CompleteStart.call( this.Window ) ;
		}
	}
	else
	{
		var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ;
		eTextarea.className = 'SourceField' ;
		eTextarea.dir = 'ltr' ;
		FCKDomTools.SetElementStyles( eTextarea,
			{
				width	: '100%',
				height	: '100%',
				border	: 'none',
				resize	: 'none',
				outline	: 'none'
			} ) ;
		eTargetElement.appendChild( eTextarea ) ;

		eTextarea.value = html  ;

		// Fire the "OnLoad" event.
		FCKTools.RunFunction( this.OnLoad ) ;
	}
}

// "this" here is FCKEditingArea.Window
function FCKEditingArea_CompleteStart()
{
	// On Firefox, the DOM takes a little to become available. So we must wait for it in a loop.
	if ( !this.document.body )
	{
		this.setTimeout( FCKEditingArea_CompleteStart, 50 ) ;
		return ;
	}

	var oEditorArea = this._FCKEditingArea ;

	// Save this reference to be re-used later.
	oEditorArea.Document = oEditorArea.Window.document ;

	oEditorArea.MakeEditable() ;

	// Fire the "OnLoad" event.
	FCKTools.RunFunction( oEditorArea.OnLoad ) ;
}

FCKEditingArea.prototype.MakeEditable = function()
{
	var oDoc = this.Document ;

	if ( FCKBrowserInfo.IsIE )
	{
		// Kludge for #141 and #523
		oDoc.body.disabled = true ;
		oDoc.body.contentEditable = true ;
		oDoc.body.removeAttribute( "disabled" ) ;

		/* The following commands don't throw errors, but have no effect.
		oDoc.execCommand( 'AutoDetect', false, false ) ;
		oDoc.execCommand( 'KeepSelection', false, true ) ;
		*/
	}
	else
	{
		try
		{
			// Disable Firefox 2 Spell Checker.
			oDoc.body.spellcheck = ( this.FFSpellChecker !== false ) ;

			if ( this._BodyHTML )
			{
				oDoc.body.innerHTML = this._BodyHTML ;
				oDoc.body.offsetLeft ;		// Don't remove, this is a hack to fix Opera 9.50, see #2264.
				this._BodyHTML = null ;
			}

			oDoc.designMode = 'on' ;

			// Tell Gecko (Firefox 1.5+) to enable or not live resizing of objects (by Alfonso Martinez)
			oDoc.execCommand( 'enableObjectResizing', false, !FCKConfig.DisableObjectResizing ) ;

			// Disable the standard table editing features of Firefox.
			oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ;
		}
		catch (e)
		{
			// In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception
			// So we set up a DOM Mutation event Listener on the HTML, as it will raise several events when the document is  visible again
			FCKTools.AddEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ;
		}

	}
}

// This function processes the notifications of the DOM Mutation event on the document
// We use it to know that the document will be ready to be editable again (or we hope so)
function FCKEditingArea_Document_AttributeNodeModified( evt )
{
	var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ;

	// We want to run our function after the events no longer fire, so we can know that it's a stable situation
	if ( editingArea._timer )
		window.clearTimeout( editingArea._timer ) ;

	editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ;
}

// This function ideally should be called after the document is visible, it does clean up of the
// mutation tracking and tries again to make the area editable.
function FCKEditingArea_MakeEditableByMutation()
{
	// Clean up
	delete this._timer ;
	// Now we don't want to keep on getting this event
	FCKTools.RemoveEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ;
	// Let's try now to set the editing area editable
	// If it fails it will set up the Mutation Listener again automatically
	this.MakeEditable() ;
}

FCKEditingArea.prototype.Focus = function()
{
	try
	{
		if ( this.Mode == FCK_EDITMODE_WYSIWYG )
		{
			if ( FCKBrowserInfo.IsIE )
				this._FocusIE() ;
			else
				this.Window.focus() ;
		}
		else
		{
			var oDoc = FCKTools.GetElementDocument( this.Textarea ) ;
			if ( (!oDoc.hasFocus || oDoc.hasFocus() ) && oDoc.activeElement == this.Textarea )
				return ;

			this.Textarea.focus() ;
		}
	}
	catch(e) {}
}

FCKEditingArea.prototype._FocusIE = function()
{
	// In IE it can happen that the document is in theory focused but the
	// active element is outside of it.
	this.Document.body.setActive() ;

	this.Window.focus() ;

	// Kludge for #141... yet more code to workaround IE bugs
	var range = this.Document.selection.createRange() ;

	var parentNode = range.parentElement() ;
	var parentTag = parentNode.nodeName.toLowerCase() ;

	// Only apply the fix when in a block, and the block is empty.
	if ( parentNode.childNodes.length > 0 ||
		 !( FCKListsLib.BlockElements[parentTag] ||
		    FCKListsLib.NonEmptyBlockElements[parentTag] ) )
	{
		return ;
	}

	// Force the selection to happen, in this way we guarantee the focus will
	// be there.
	range = new FCKDomRange( this.Window ) ;
	range.MoveToElementEditStart( parentNode ) ;
	range.Select() ;
}

function FCKEditingArea_Cleanup()
{
	if ( this.Document )
		this.Document.body.innerHTML = "" ;
	this.TargetElement = null ;
	this.IFrame = null ;
	this.Document = null ;
	this.Textarea = null ;

	if ( this.Window )
	{
		this.Window._FCKEditingArea = null ;
		this.Window = null ;
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费高清在线观看| 国产精品久久久久久一区二区三区 | 精品第一国产综合精品aⅴ| 成人免费福利片| 日韩精品电影一区亚洲| 欧美激情一区二区在线| 欧美一区二区高清| 欧美综合色免费| 国产一区二区三区高清播放| 亚洲成人免费av| 中文字幕日韩一区二区| 精品日产卡一卡二卡麻豆| 欧美伊人久久久久久久久影院| 国产精品一区一区| 青青草原综合久久大伊人精品优势| 亚洲人成在线播放网站岛国| 成人综合在线网站| 国产亚洲短视频| 91美女福利视频| 亚洲一区二区视频在线观看| 精品国产1区二区| 久久精工是国产品牌吗| 久久精品国产在热久久| 视频一区视频二区在线观看| 亚洲精品国产一区二区精华液 | 欧洲精品视频在线观看| 欧美日韩中文字幕一区二区| 国产精品网友自拍| 亚洲va国产天堂va久久en| 91在线观看成人| www.亚洲色图| 91麻豆精品国产91久久久久久 | 亚洲欧美aⅴ...| 日本久久一区二区| 26uuuu精品一区二区| av动漫一区二区| 国产精品嫩草影院av蜜臀| 国产不卡视频一区| 国产日本亚洲高清| 国产综合色精品一区二区三区| 欧美国产禁国产网站cc| 国内精品久久久久影院一蜜桃| 久久久91精品国产一区二区精品 | 337p亚洲精品色噜噜噜| 亚洲免费电影在线| 在线播放91灌醉迷j高跟美女| 免费看日韩a级影片| 最新热久久免费视频| 欧美中文字幕一区| 蜜桃久久久久久| 日韩福利电影在线| 欧美变态凌虐bdsm| 4438x亚洲最大成人网| 国产精品亚洲专一区二区三区 | 国产精品福利一区二区三区| 日韩色视频在线观看| 亚洲国产成人av网| 亚洲一区二区精品视频| 亚洲尤物在线视频观看| 亚洲福利视频三区| 麻豆91精品视频| 国产一区不卡视频| www.综合网.com| 欧美日韩免费一区二区三区| 7777精品伊人久久久大香线蕉最新版| 日韩一区二区精品葵司在线| 亚洲精品一区在线观看| 国产精品二区一区二区aⅴ污介绍| 亚洲乱码中文字幕| 图片区日韩欧美亚洲| 精品一区二区免费看| 国产乱人伦精品一区二区在线观看| 成人小视频免费在线观看| 色综合天天综合色综合av| 欧美日韩亚洲综合在线| 欧美不卡一区二区| 亚洲图片另类小说| 奇米精品一区二区三区四区| 国产成人免费在线观看| 在线这里只有精品| 精品国产乱码久久久久久久 | 欧美一区二视频| 国产亚洲制服色| 亚洲午夜激情av| 国产在线麻豆精品观看| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 国产午夜精品一区二区 | 香港成人在线视频| 黄页网站大全一区二区| 色综合色狠狠综合色| 日韩欧美在线网站| 亚洲色图欧美偷拍| 蜜臀久久久99精品久久久久久| 97se狠狠狠综合亚洲狠狠| 91精品国产色综合久久| 中文字幕在线不卡一区二区三区| 三级不卡在线观看| 成人av网站免费观看| 日韩欧美激情四射| 亚洲自拍偷拍九九九| 国产高清亚洲一区| 91精品国产91久久久久久最新毛片| 中日韩av电影| 六月婷婷色综合| 欧美日韩在线亚洲一区蜜芽| 国产精品久久久久影院色老大| 99re这里只有精品视频首页| 亚洲精品在线免费观看视频| 午夜激情久久久| 91蜜桃在线观看| 国产日本欧洲亚洲| 国产一区二区三区久久久| 欧美顶级少妇做爰| 一区二区免费看| 不卡视频在线看| 国产精品私人影院| 国产大片一区二区| 2019国产精品| 麻豆91在线观看| 欧美一区二区三区思思人| 亚洲综合久久久| 色国产综合视频| 亚洲免费观看高清完整版在线观看| 国产精品99久| 精品福利在线导航| 青青国产91久久久久久| 91精选在线观看| 天堂在线亚洲视频| 欧美色电影在线| 亚洲成人av免费| 欧美怡红院视频| 亚洲成人高清在线| 欧美另类变人与禽xxxxx| 亚洲最大色网站| 欧美午夜精品一区| 亚洲国产精品久久不卡毛片| 在线视频一区二区三| 亚洲国产三级在线| 精品视频一区二区不卡| 亚洲h在线观看| 欧美一区二区视频在线观看2022| 三级久久三级久久| 欧美mv和日韩mv的网站| 国内精品在线播放| 久久丝袜美腿综合| 丁香六月久久综合狠狠色| 欧美激情在线一区二区| 97精品国产97久久久久久久久久久久| 中文字幕av在线一区二区三区| 成人免费高清在线| 亚洲免费在线看| 欧美日韩在线直播| 蜜桃91丨九色丨蝌蚪91桃色| 久久久亚洲午夜电影| 国产成人精品一区二| 亚洲色图欧洲色图| 欧美福利视频导航| 麻豆精品一区二区综合av| 久久综合一区二区| 不卡一区在线观看| 亚洲一区在线视频| 欧美va亚洲va| 成人高清伦理免费影院在线观看| 最新日韩在线视频| 欧美日韩视频不卡| 黄色资源网久久资源365| 国产精品午夜在线| 欧美日韩一区精品| 久久精品国产一区二区三区免费看| 久久精品一区四区| 色婷婷久久99综合精品jk白丝| 日本中文字幕一区二区视频 | 精品少妇一区二区三区日产乱码| 国产馆精品极品| 亚洲综合视频在线| 精品国产91久久久久久久妲己| eeuss国产一区二区三区| 午夜成人免费电影| 国产欧美日韩不卡免费| 欧美自拍偷拍午夜视频| 国产资源在线一区| 一级做a爱片久久| 久久久久高清精品| 在线免费观看日本一区| 国产在线观看免费一区| 亚洲国产精品传媒在线观看| 风间由美一区二区av101| 国产又黄又大久久| 亚洲免费av在线| 欧美成人艳星乳罩| 欧美自拍丝袜亚洲| 国产成人在线视频网址| 亚洲国产另类av| 国产精品国产精品国产专区不片| 亚洲精品国产一区二区三区四区在线| 精品福利一区二区三区 | 欧美日韩在线播| 成人动漫av在线| 精品影视av免费| 午夜欧美电影在线观看|