Index: /FCKeditor/trunk/editor/_source/classes/fckdomrange_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckdomrange_gecko.js	(revision 588)
+++ /FCKeditor/trunk/editor/_source/classes/fckdomrange_gecko.js	(revision 589)
@@ -35,4 +35,6 @@
 		this._UpdateElementInfo() ;
 	}
+	else
+		this.MoveToElementStart( this.Window.document.body ) ;
 }
 
Index: /FCKeditor/trunk/editor/_source/classes/fckeditingarea.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckeditingarea.js	(revision 588)
+++ /FCKeditor/trunk/editor/_source/classes/fckeditingarea.js	(revision 589)
@@ -170,4 +170,6 @@
 	if ( FCKBrowserInfo.IsIE )
 	{
+		// The fiddling with UNSELECTABLE is a trick for fixing an IE browser bug, don't remove.
+		// See #523 for information about the bug.
 		oDoc.body.unselectable = "on" ;
 		oDoc.body.contentEditable = true ;
Index: /FCKeditor/trunk/editor/_source/internals/fck_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck_gecko.js	(revision 588)
+++ /FCKeditor/trunk/editor/_source/internals/fck_gecko.js	(revision 589)
@@ -54,4 +54,25 @@
 		FCK.Events.FireEvent( "OnMouseUp",e ) ;
 	}
+
+	this._ExecDrop = function( evt )
+	{
+		if ( FCKConfig.ForcePasteAsPlainText )
+		{
+			if ( evt.dataTransfer )
+			{
+				var text = evt.dataTransfer.getData( 'Text' ) ;
+				text = FCKTools.HTMLEncode( text ) ;
+				text = FCKTools.ProcessLineBreaks( window, FCKConfig, text ) ;
+				FCK.InsertHtml( text ) ;
+			}
+			else
+				FCK.PasteAsPlainText() ;
+		}
+		else
+			FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security' ) ;
+		evt.preventDefault() ;
+		evt.stopPropagation() ;
+	}
+
 	this.ExecOnSelectionChangeTimer = function()
 	{
@@ -83,4 +104,18 @@
 	this.EditorDocument.addEventListener( 'mouseup', this._ExecMouseUp, true ) ;
 	this.EditorDocument.addEventListener( 'mousemove', this._ExecMouseMove, true ) ;
+
+	// Hooks for data object drops
+	if ( FCKBrowserInfo.IsGecko )
+	{
+		this.EditorWindow.captureEvents( Event.DRAGDROP ) ;
+		this.EditorWindow.addEventListener( 'dragdrop', this._ExecDrop, true ) ;
+	}
+	else if ( FCKBrowserInfo.IsSafari )
+	{
+		var cancelHandler = function( evt ){ evt.returnValue = false ; }
+		this.EditorDocument.addEventListener( 'dragenter', cancelHandler, true ) ;
+		this.EditorDocument.addEventListener( 'dragover', cancelHandler, true ) ;
+		this.EditorDocument.addEventListener( 'drop', this._ExecDrop, true ) ;
+	}
 
 	// Reset the context menu.
@@ -191,4 +226,13 @@
 	var oRange = oSel.getRangeAt(0) ;
 
+	// If a range is not available ( occurs under Safari )
+	// Append to the end of the editor document.
+	if ( ! oRange )
+	{
+		oRange = this.EditorDocument.createRange() ;
+		oRange.selectNodeContents( this.EditorDocument.body ) ;
+		oRange.collapse( false ) ;
+	}
+
 	// Create a fragment with the input HTML.
 	var oFragment = oRange.createContextualFragment( html ) ;
Index: /FCKeditor/trunk/editor/_source/internals/fck_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 588)
+++ /FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 589)
@@ -107,4 +107,20 @@
 }
 
+function Doc_OnDrop()
+{
+	var evt = FCK.EditorWindow.event ;
+	if ( FCKConfig.ForcePasteAsPlainText )
+		FCK.PasteAsPlainText( evt.dataTransfer.getData( 'Text' ) ) ;
+	else
+		FCKTools.RunFunction( FCKDialog.OpenDialog, FCKDialog, ['FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security'] ) ;
+	evt.returnValue = false ;
+	evt.cancelBubble = true ;
+}
+
+function Doc_CancelDefault()
+{
+	FCK.EditorWindow.event.returnValue = false ;
+}
+
 FCK.InitializeBehaviors = function( dontReturn )
 {
@@ -115,4 +131,9 @@
 	// Intercept pasting operations
 	this.EditorDocument.body.attachEvent( 'onpaste', Doc_OnPaste ) ;
+
+	// Intercept drop operations
+	this.EditorDocument.body.attachEvent( 'ondragenter', Doc_CancelDefault ) ;
+	this.EditorDocument.body.attachEvent( 'ondragover', Doc_CancelDefault ) ;
+	this.EditorDocument.body.attachEvent( 'ondrop', Doc_OnDrop ) ;
 
 	// Reset the context menu.
@@ -251,5 +272,5 @@
 }
 
-FCK.PasteAsPlainText = function()
+FCK.PasteAsPlainText = function( forceText )
 {
 	if ( !FCK._CheckIsPastingEnabled() )
@@ -260,5 +281,9 @@
 
 	// Get the data available in the clipboard in text format.
-	var sText = clipboardData.getData("Text") ;
+	var sText = null ;
+	if ( ! forceText )
+		sText = clipboardData.getData("Text") ;
+	else 
+		sText = forceText ;
 
 	if ( sText && sText.length > 0 )
