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

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

?? fckenterkey.js

?? 強大的個人日志系統,界面華麗
?? JS
?? 第 1 頁 / 共 2 頁
字號:
?/*
 * 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 ==
 *
 * Controls the [Enter] keystroke behavior in a document.
 */

/*
 *	Constructor.
 *		@targetDocument : the target document.
 *		@enterMode : the behavior for the <Enter> keystroke.
 *			May be "p", "div", "br". Default is "p".
 *		@shiftEnterMode : the behavior for the <Shift>+<Enter> keystroke.
 *			May be "p", "div", "br". Defaults to "br".
 */
var FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode, tabSpaces )
{
	this.Window			= targetWindow ;
	this.EnterMode		= enterMode || 'p' ;
	this.ShiftEnterMode	= shiftEnterMode || 'br' ;

	// Setup the Keystroke Handler.
	var oKeystrokeHandler = new FCKKeystrokeHandler( false ) ;
	oKeystrokeHandler._EnterKey = this ;
	oKeystrokeHandler.OnKeystroke = FCKEnterKey_OnKeystroke ;

	oKeystrokeHandler.SetKeystrokes( [
		[ 13		, 'Enter' ],
		[ SHIFT + 13, 'ShiftEnter' ],
		[ 8			, 'Backspace' ],
		[ CTRL + 8	, 'CtrlBackspace' ],
		[ 46		, 'Delete' ]
	] ) ;

	this.TabText = '' ;

	// Safari by default inserts 4 spaces on TAB, while others make the editor
	// loose focus. So, we need to handle it here to not include those spaces.
	if ( tabSpaces > 0 || FCKBrowserInfo.IsSafari )
	{
		while ( tabSpaces-- )
			this.TabText += '\xa0' ;

		oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] );
	}

	oKeystrokeHandler.AttachToElement( targetWindow.document ) ;
}


function FCKEnterKey_OnKeystroke(  keyCombination, keystrokeValue )
{
	var oEnterKey = this._EnterKey ;

	try
	{
		switch ( keystrokeValue )
		{
			case 'Enter' :
				return oEnterKey.DoEnter() ;
				break ;
			case 'ShiftEnter' :
				return oEnterKey.DoShiftEnter() ;
				break ;
			case 'Backspace' :
				return oEnterKey.DoBackspace() ;
				break ;
			case 'Delete' :
				return oEnterKey.DoDelete() ;
				break ;
			case 'Tab' :
				return oEnterKey.DoTab() ;
				break ;
			case 'CtrlBackspace' :
				return oEnterKey.DoCtrlBackspace() ;
				break ;
		}
	}
	catch (e)
	{
		// If for any reason we are not able to handle it, go
		// ahead with the browser default behavior.
	}

	return false ;
}

/*
 * Executes the <Enter> key behavior.
 */
FCKEnterKey.prototype.DoEnter = function( mode, hasShift )
{
	// Save an undo snapshot before doing anything
	FCKUndo.SaveUndoStep() ;

	this._HasShift = ( hasShift === true ) ;

	var parentElement = FCKSelection.GetParentElement() ;
	var parentPath = new FCKElementPath( parentElement ) ;
	var sMode = mode || this.EnterMode ;

	if ( sMode == 'br' || parentPath.Block && parentPath.Block.tagName.toLowerCase() == 'pre' )
		return this._ExecuteEnterBr() ;
	else
		return this._ExecuteEnterBlock( sMode ) ;
}

/*
 * Executes the <Shift>+<Enter> key behavior.
 */
FCKEnterKey.prototype.DoShiftEnter = function()
{
	return this.DoEnter( this.ShiftEnterMode, true ) ;
}

/*
 * Executes the <Backspace> key behavior.
 */
FCKEnterKey.prototype.DoBackspace = function()
{
	var bCustom = false ;

	// Get the current selection.
	var oRange = new FCKDomRange( this.Window ) ;
	oRange.MoveToSelection() ;

	// Kludge for #247
	if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) )
	{
		this._FixIESelectAllBug( oRange ) ;
		return true ;
	}

	var isCollapsed = oRange.CheckIsCollapsed() ;

	if ( !isCollapsed )
	{
		// Bug #327, Backspace with an img selection would activate the default action in IE.
		// Let's override that with our logic here.
		if ( FCKBrowserInfo.IsIE && this.Window.document.selection.type.toLowerCase() == "control" )
		{
			var controls = this.Window.document.selection.createRange() ;
			for ( var i = controls.length - 1 ; i >= 0 ; i-- )
			{
				var el = controls.item( i ) ;
				el.parentNode.removeChild( el ) ;
			}
			return true ;
		}

		return false ;
	}

	// On IE, it is better for us handle the deletion if the caret is preceeded
	// by a <br> (#1383).
	if ( FCKBrowserInfo.IsIE )
	{
		var previousElement = FCKDomTools.GetPreviousSourceElement( oRange.StartNode, true ) ;

		if ( previousElement && previousElement.nodeName.toLowerCase() == 'br' )
		{
			// Create a range that starts after the <br> and ends at the
			// current range position.
			var testRange = oRange.Clone() ;
			testRange.SetStart( previousElement, 4 ) ;

			// If that range is empty, we can proceed cleaning that <br> manually.
			if ( testRange.CheckIsEmpty() )
			{
				previousElement.parentNode.removeChild( previousElement ) ;
				return true ;
			}
		}
	}

	var oStartBlock = oRange.StartBlock ;
	var oEndBlock = oRange.EndBlock ;

	// The selection boundaries must be in the same "block limit" element
	if ( oRange.StartBlockLimit == oRange.EndBlockLimit && oStartBlock && oEndBlock )
	{
		if ( !isCollapsed )
		{
			var bEndOfBlock = oRange.CheckEndOfBlock() ;

			oRange.DeleteContents() ;

			if ( oStartBlock != oEndBlock )
			{
				oRange.SetStart(oEndBlock,1) ;
				oRange.SetEnd(oEndBlock,1) ;

//				if ( bEndOfBlock )
//					oEndBlock.parentNode.removeChild( oEndBlock ) ;
			}

			oRange.Select() ;

			bCustom = ( oStartBlock == oEndBlock ) ;
		}

		if ( oRange.CheckStartOfBlock() )
		{
			var oCurrentBlock = oRange.StartBlock ;

			var ePrevious = FCKDomTools.GetPreviousSourceElement( oCurrentBlock, true, [ 'BODY', oRange.StartBlockLimit.nodeName ], ['UL','OL'] ) ;

			bCustom = this._ExecuteBackspace( oRange, ePrevious, oCurrentBlock ) ;
		}
		else if ( FCKBrowserInfo.IsGeckoLike )
		{
			// Firefox and Opera (#1095) loose the selection when executing
			// CheckStartOfBlock, so we must reselect.
			oRange.Select() ;
		}
	}

	oRange.Release() ;
	return bCustom ;
}

FCKEnterKey.prototype.DoCtrlBackspace = function()
{
	FCKUndo.SaveUndoStep() ;
	var oRange = new FCKDomRange( this.Window ) ;
	oRange.MoveToSelection() ;
	if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) )
	{
		this._FixIESelectAllBug( oRange ) ;
		return true ;
	}
	return false ;
}

FCKEnterKey.prototype._ExecuteBackspace = function( range, previous, currentBlock )
{
	var bCustom = false ;

	// We could be in a nested LI.
	if ( !previous && currentBlock && currentBlock.nodeName.IEquals( 'LI' ) && currentBlock.parentNode.parentNode.nodeName.IEquals( 'LI' ) )
	{
		this._OutdentWithSelection( currentBlock, range ) ;
		return true ;
	}

	if ( previous && previous.nodeName.IEquals( 'LI' ) )
	{
		var oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ;

		while ( oNestedList )
		{
			previous = FCKDomTools.GetLastChild( oNestedList, 'LI' ) ;
			oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ;
		}
	}

	if ( previous && currentBlock )
	{
		// If we are in a LI, and the previous block is not an LI, we must outdent it.
		if ( currentBlock.nodeName.IEquals( 'LI' ) && !previous.nodeName.IEquals( 'LI' ) )
		{
			this._OutdentWithSelection( currentBlock, range ) ;
			return true ;
		}

		// Take a reference to the parent for post processing cleanup.
		var oCurrentParent = currentBlock.parentNode ;

		var sPreviousName = previous.nodeName.toLowerCase() ;
		if ( FCKListsLib.EmptyElements[ sPreviousName ] != null || sPreviousName == 'table' )
		{
			FCKDomTools.RemoveNode( previous ) ;
			bCustom = true ;
		}
		else
		{
			// Remove the current block.
			FCKDomTools.RemoveNode( currentBlock ) ;

			// Remove any empty tag left by the block removal.
			while ( oCurrentParent.innerHTML.Trim().length == 0 )
			{
				var oParent = oCurrentParent.parentNode ;
				oParent.removeChild( oCurrentParent ) ;
				oCurrentParent = oParent ;
			}

			// Cleanup the previous and the current elements.
			FCKDomTools.LTrimNode( currentBlock ) ;
			FCKDomTools.RTrimNode( previous ) ;

			// Append a space to the previous.
			// Maybe it is not always desirable...
			// previous.appendChild( this.Window.document.createTextNode( ' ' ) ) ;

			// Set the range to the end of the previous element and bookmark it.
			range.SetStart( previous, 2, true ) ;
			range.Collapse( true ) ;
			var oBookmark = range.CreateBookmark( true ) ;

			// Move the contents of the block to the previous element and delete it.
			// But for some block types (e.g. table), moving the children to the previous block makes no sense.
			// So a check is needed. (See #1081)
			if ( ! currentBlock.tagName.IEquals( [ 'TABLE' ] ) )
				FCKDomTools.MoveChildren( currentBlock, previous ) ;

			// Place the selection at the bookmark.
			range.SelectBookmark( oBookmark ) ;

			bCustom = true ;
		}
	}

	return bCustom ;
}

/*
 * Executes the <Delete> key behavior.
 */
FCKEnterKey.prototype.DoDelete = function()
{
	// Save an undo snapshot before doing anything
	// This is to conform with the behavior seen in MS Word
	FCKUndo.SaveUndoStep() ;

	// The <Delete> has the same effect as the <Backspace>, so we have the same
	// results if we just move to the next block and apply the same <Backspace> logic.

	var bCustom = false ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕免费观看一区| av在线免费不卡| 粉嫩嫩av羞羞动漫久久久 | 亚洲图片欧美激情| 亚洲h在线观看| 99精品国产一区二区三区不卡 | 色哟哟日韩精品| 精品久久人人做人人爰| 一区二区三区免费| 成人一区二区三区中文字幕| 欧美高清你懂得| 亚洲国产精品自拍| 色综合天天综合色综合av| 久久久精品一品道一区| 麻豆精品在线视频| 欧美一区二区三区在线视频| 亚洲最新视频在线播放| 91在线视频18| 亚洲人成网站精品片在线观看| 国内精品国产成人| 精品国产一区二区三区忘忧草 | 亚洲欧美色一区| 懂色av中文字幕一区二区三区 | 丁香激情综合国产| 日韩午夜精品电影| 麻豆成人在线观看| 精品国产a毛片| 精品一区二区三区在线观看| 777a∨成人精品桃花网| 午夜精品久久久久久久久久| 欧美日韩一区二区三区不卡| 亚洲一区二区三区激情| 欧美天天综合网| 亚洲成年人影院| 69堂成人精品免费视频| 青草av.久久免费一区| 日韩欧美视频一区| 九九九精品视频| 国产亚洲自拍一区| 国产iv一区二区三区| 国产精品私人自拍| aaa亚洲精品| 亚洲自拍偷拍麻豆| 91精品国产综合久久香蕉的特点| 日本亚洲免费观看| 久久亚区不卡日本| 成人性生交大片免费| 亚洲三级视频在线观看| 欧美综合一区二区三区| 肉色丝袜一区二区| 精品国产伦一区二区三区观看方式| 国产美女精品人人做人人爽| 国产精品乱人伦| 欧美色国产精品| 国内外精品视频| 亚洲精品亚洲人成人网在线播放| 欧美日韩大陆一区二区| 国产美女一区二区| 一区二区三区精品在线观看| 在线播放中文字幕一区| 国产成人免费在线观看| 亚洲免费在线电影| 精品国产乱码久久久久久蜜臀| 国产成人av福利| 亚洲国产精品久久人人爱蜜臀| 欧美大片在线观看| 99精品黄色片免费大全| 另类小说综合欧美亚洲| 中文字幕在线视频一区| 5566中文字幕一区二区电影| 国产九色精品成人porny| 艳妇臀荡乳欲伦亚洲一区| 欧美精品一区二区在线播放 | 亚洲国产美国国产综合一区二区| 精品捆绑美女sm三区| 91老司机福利 在线| 天天色天天操综合| 国产精品网站在线| 精品成人私密视频| 在线一区二区三区| 国产a视频精品免费观看| 日韩电影免费一区| 亚洲图片欧美激情| 久久嫩草精品久久久精品| 欧美色成人综合| 99久久精品免费看| 国产精品 日产精品 欧美精品| 亚洲一二三级电影| 中文字幕一区av| 久久影院视频免费| 欧美一区二区三区四区高清 | 成人免费黄色大片| 蓝色福利精品导航| 日本v片在线高清不卡在线观看| 国产精品国产自产拍高清av| 久久久久久毛片| 日韩精品专区在线影院观看| 欧美网站一区二区| 欧美一a一片一级一片| 99精品国产热久久91蜜凸| 国产高清不卡一区| 国产揄拍国内精品对白| 蜜臀av亚洲一区中文字幕| 亚洲va中文字幕| 亚洲图片欧美视频| 亚洲在线免费播放| 亚洲国产一区在线观看| 尤物视频一区二区| 亚洲欧美视频在线观看| 亚洲欧美日韩国产中文在线| 中文字幕一区三区| 国产精品传媒视频| 亚洲欧洲日韩女同| 亚洲免费伊人电影| 一二三区精品视频| 一区二区三区毛片| 亚洲成人免费看| 日本三级亚洲精品| 久久99精品网久久| 精品无人码麻豆乱码1区2区| 美女视频第一区二区三区免费观看网站| 亚洲第四色夜色| 免费在线成人网| 国产一区在线观看视频| 国产成人av影院| 9久草视频在线视频精品| 日本高清不卡aⅴ免费网站| 欧洲av一区二区嗯嗯嗯啊| 欧美日产在线观看| 欧美成人女星排名| 中文子幕无线码一区tr | 国产精品理论在线观看| 综合网在线视频| 亚洲一区二区三区四区在线| 亚洲成人动漫一区| 国产一本一道久久香蕉| 91在线观看成人| 欧美在线观看视频在线| 欧美成人精品二区三区99精品| 久久老女人爱爱| 一区二区成人在线| 久久国产精品99久久人人澡| 国产99久久久国产精品潘金网站| 91麻豆高清视频| 日韩免费观看高清完整版在线观看| 精品成人佐山爱一区二区| 中文字幕第一区第二区| 亚洲免费观看视频| 青青草国产成人99久久| 懂色av一区二区三区免费看| 欧美三级电影精品| 久久久久久久网| 亚洲第一精品在线| 国产成人丝袜美腿| 91精品国产欧美一区二区| 中文字幕第一区| 久久99国产精品久久99果冻传媒| 99久久免费精品高清特色大片| 欧美男人的天堂一二区| 久久精品亚洲精品国产欧美| 午夜电影网一区| 不卡大黄网站免费看| 日韩欧美一二三四区| 亚洲国产视频一区| 69p69国产精品| 亚洲天堂a在线| 国产美女久久久久| 欧美卡1卡2卡| 亚洲精品久久久蜜桃| 国产成人免费视频一区| 欧美大胆一级视频| 亚洲成人av中文| 日本乱人伦一区| 成人欧美一区二区三区白人| 精一区二区三区| 欧美丰满一区二区免费视频| 亚洲精品综合在线| av高清不卡在线| 国产丝袜欧美中文另类| 欧美日韩国产123区| 日韩不卡一二三区| 欧美激情一区二区三区| 亚洲精品一区二区在线观看| 亚洲综合自拍偷拍| 97se狠狠狠综合亚洲狠狠| 久久久不卡网国产精品二区| 欧美aⅴ一区二区三区视频| 欧美三级三级三级| 一区二区三区精品久久久| 97久久精品人人澡人人爽| 国产欧美va欧美不卡在线| 卡一卡二国产精品| 欧美一区二区久久久| 奇米四色…亚洲| 91精品国产综合久久小美女| 日韩成人精品在线观看| 欧美高清你懂得| 蜜桃视频免费观看一区| 欧美大尺度电影在线| 国产永久精品大片wwwapp|