Index: typo3/sysext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php
===================================================================
--- typo3/sysext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php	(revision 3321)
+++ typo3/sysext/rtehtmlarea/extensions/TYPO3HtmlParser/class.tx_rtehtmlarea_typo3htmlparser.php	(working copy)
@@ -49,7 +49,7 @@
 		);
 	
 	public function main($parentObject) {
-		return parent::main($parentObject) && $this->thisConfig['enableWordClean'] && is_array($this->thisConfig['enableWordClean.']);
+		return parent::main($parentObject) && $this->thisConfig['enableWordClean'] && is_array($this->thisConfig['enableWordClean.']['HTMLparser.']);
 	}
 	
 	/**
Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js	(revision 3321)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js	(working copy)
@@ -366,9 +366,9 @@
  */
 HTMLArea.prototype.getBookmarkNode = function(bookmark, endPoint) {
 	if (endPoint) {
-		return bookmark.startNode || this._doc.getElementById(bookmark.startId);
+		return this._doc.getElementById(bookmark.startId);
 	} else {
-		return bookmark.endNode || this._doc.getElementById(bookmark.endId);
+		return this._doc.getElementById(bookmark.endId);
 	}
 };
 
@@ -518,8 +518,10 @@
 		// Mozilla lauches an exception, but can paste anyway on ctrl-V
 		// UI is false on keyboard shortcut, and undefined on button click
 	if(typeof(UI) != "undefined") {
-		this._doc.execCommand(cmdID, UI, param);
-		if (cmdID == "Paste" && this.config.killWordOnPaste) HTMLArea._wordClean(this._doc.body);
+		try { this._doc.execCommand(cmdID, UI, param); } catch(e) { }
+		if (cmdID == "Paste" && this._toolbarObjects.CleanWord) {
+			this._toolbarObjects.CleanWord.cmd(this, "CleanWord");
+		}
 	} else if (this.config.enableMozillaExtension) {
 		if (confirm(HTMLArea.I18N.msg["Allow-Clipboard-Helper-Extension"])) {
 			if (InstallTrigger.enabled()) {
Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js	(revision 3321)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js	(working copy)
@@ -1813,7 +1813,8 @@
 		case "Paste"	:
 			try {
 				this._doc.execCommand(cmdID, false, null);
-				if (cmdID == "Paste" && this._toolbarObjects.CleanWord) {
+					// In FF3, the paste operation will indeed trigger the paste event
+				if (HTMLArea.is_gecko && cmdID == "Paste" && this._toolbarObjects.CleanWord && navigator.productSub < 2008020514) {
 					this._toolbarObjects.CleanWord.cmd(this, "CleanWord");
 				}
 			} catch (e) {
@@ -1890,10 +1891,13 @@
 							editor.execCommand(cmd, false, null);
 							HTMLArea._stopEvent(ev);
 							return false;
-						} else if (editor._toolbarObjects.CleanWord) {
-							var cleanLaterFunctRef = editor.plugins.DefaultClean ? editor.plugins.DefaultClean.instance.cleanLaterFunctRef : (editor.plugins.TYPO3HtmlParser ? editor.plugins.TYPO3HtmlParser.instance.cleanLaterFunctRef : null);
-							if (cleanLaterFunctRef) {
-								window.setTimeout(cleanLaterFunctRef, 50);
+							// In FF3, the paste operation will indeed trigger the paste event
+						} else if (HTMLArea.is_opera || (HTMLArea.is_gecko && navigator.productSub < 2008020514)) {
+							if (editor._toolbarObjects.CleanWord) {
+								var cleanLaterFunctRef = editor.plugins.DefaultClean ? editor.plugins.DefaultClean.instance.cleanLaterFunctRef : (editor.plugins.TYPO3HtmlParser ? editor.plugins.TYPO3HtmlParser.instance.cleanLaterFunctRef : null);
+								if (cleanLaterFunctRef) {
+									window.setTimeout(cleanLaterFunctRef, 50);
+								}
 							}
 						}
 						break;
@@ -2029,10 +2033,11 @@
 HTMLArea.prototype.setHTML = function(html) {
 	switch (this._editMode) {
 		case "wysiwyg":
-			if(!this.config.fullPage) this._doc.body.innerHTML = html;
-				else this._doc.body.innerHTML = html;
+			this._doc.body.innerHTML = html;
 			break;
-		case "textmode": this._textArea.value = html; break;
+		case "textmode":
+			this._textArea.value = html;
+			break;
 	}
 	return false;
 };
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js	(revision 3321)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js	(working copy)
@@ -82,8 +82,8 @@
 			// Could be a button or its hotkey
 		var buttonId = this.translateHotKey(id);
 		buttonId = buttonId ? buttonId : id;
-		
-		this.clean(this.editor._doc.body);
+		var bookmark = this.editor.getBookmark(this.editor._createRange(this.editor._getSelection()));
+		this.clean(this.editor._doc.body, bookmark);
 		return false;
 	},
 	
@@ -93,22 +93,24 @@
 		HTMLArea._addEvents((HTMLArea.is_ie ? doc.body : doc), ["paste","dragdrop","drop"], cleanFunctRef, true);
 	},
 	
-	clean : function(body) {
+	clean : function(body, bookmark) {
 		var editor = this.editor;
 		var content = {
 			editorNo : this.editorNumber,
 			content : body.innerHTML
 		};
-		this.postData(this.parseHtmlModulePath, content, function(response) { editor.setHTML(response); });
-		return true;
+		this.postData(	this.parseHtmlModulePath,
+				content,
+				function(response) {
+					editor.setHTML(response);
+					editor.selectRange(editor.moveToBookmark(bookmark));
+				}
+		);
 	},
 	
 	cleanLater : function () {
-		this.clean(this.editor._doc.body);
-		if (this.doUpdateToolbar) {
-			this.editor.updateToolbar();
-		}
-		this.doUpdateToolbar = false;
+		var bookmark = this.editor.getBookmark(this.editor._createRange(this.editor._getSelection()));
+		this.clean(this.editor._doc.body, bookmark);
 	},
 	
 	/*
@@ -125,7 +127,6 @@
 		if (typeof(HTMLArea.Dialog) != "undefined" && HTMLArea.Dialog.TYPO3Image) {
 			HTMLArea.Dialog.TYPO3Image.close();
 		} else {
-			this.doUpdateToolbar = false;
 			window.setTimeout(this.cleanLaterFunctRef, 250);
 		}
 	}
