Index: FCKeditor.body.php
===================================================================
--- FCKeditor.body.php	(revision 1927)
+++ FCKeditor.body.php	(working copy)
@@ -110,7 +110,7 @@
 
 	public function onCustomEditor(&$article, &$user)
 	{
-		global $wgRequest, $mediaWiki;
+		global $wgRequest, $mediaWiki, $fckPageEditor;
 
 		$action = $mediaWiki->getVal('Action');
 
@@ -121,6 +121,8 @@
 		if( !$mediaWiki->getVal( 'UseExternalEditor' ) || $action=='submit' || $internal ||
 		$section || $oldid || ( !$user->getOption( 'externaleditor' ) && !$external ) ) {
 			$editor = new FCKeditorEditPage( $article );
+			global $fckPageEditor;
+			$fckPageEditor = $editor;
 			$editor->submit();
 		} elseif( $mediaWiki->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) {
 			$mode = $wgRequest->getVal( 'mode' );
@@ -315,7 +317,7 @@
 }
 addOnloadHook( onLoadFCKeditor ) ;
 
-/*
+
 function showSource() {
 	var wp = document.getElementById("wpDiff");
 	var s = document.createElement("input");
@@ -345,7 +347,7 @@
 }
 
 addOnloadHook(showSource);
-*/
+
 </script>
 HEREDOC;
 
Index: FCKeditorEditPage.body.php
===================================================================
--- FCKeditorEditPage.body.php	(revision 1927)
+++ FCKeditorEditPage.body.php	(working copy)
@@ -7,6 +7,11 @@
 	 *
 	 * @return bool
 	 */
+	
+	public function FCKeditorEditPage( $article ){
+		parent::EditPage( $article );
+	}
+	
 	public function previewOnOpen() {
 		global $wgRequest, $wgUser;
 		if( $wgRequest->getVal( 'preview' ) == 'yes' ) {
@@ -40,4 +45,18 @@
 		}
 		return $result;
 	}
+	function getContent( $def_text = '' ) {
+		$t = parent::getContent( $def_text );
+		if(!$this->isConflict) return $t;
+		$options = new FCKeditorParserOptions();
+		$options->setTidy(true);
+		$parser = new FCKeditorParser();
+		$parser->setOutputType(OT_HTML);
+		$pa = $parser->parse($t, $this->mTitle, $options);
+		return $pa->mText;
+		
+	}
+	function getWikiContent(){
+		return $this->mArticle->getContent();
+	}
 }
\ No newline at end of file
Index: FCKeditor.php
===================================================================
--- FCKeditor.php	(revision 1927)
+++ FCKeditor.php	(working copy)
@@ -84,10 +84,23 @@
 $oFCKeditorExtension = new FCKeditor_MediaWiki();
 $oFCKeditorExtension->registerHooks();
 
+function stripComments($txt){
+	return ereg_replace("<!--.*-->", "", $txt);
+}
+function editConflictFix($pageEditor){
+	global $fckPageEditor,$wgRequest;
+	$fckPageEditor->textbox2 = stripComments($wgRequest->getVal( 'wpTextbox1' ));
+	$fckPageEditor->textbox1 = stripComments($fckPageEditor->getWikiContent());
+	return true;
+}
+global $wgHooks;
 
+$wgHooks['EditPageBeforeConflictDiff'][] = 'editConflictFix';
 
 
 
 
 
 
+
+