Index: /FCKeditor/trunk/_testcases/009.html
===================================================================
--- /FCKeditor/trunk/_testcases/009.html	(revision 97)
+++ /FCKeditor/trunk/_testcases/009.html	(revision 98)
@@ -1,3 +1,3 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <!-- @Packager.Header
 <FileDescription>
@@ -6,13 +6,12 @@
 <Author name="Frederico Caldeira Knabben" email="www.fckeditor.net" />
 -->
-<html>
-	<head>
-		<title>FCKeditor - Sample</title>
-		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" /> <!-- @Packager.RemoveLine -->
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-		<meta name="robots" content="noindex, nofollow">
-		<link href="testcases.css" rel="stylesheet" type="text/css">
-			<script type="text/javascript" src="../fckeditor.js"></script>
-			<script>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>FCKeditor - Sample</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta name="robots" content="noindex, nofollow" />
+	<link href="testcases.css" rel="stylesheet" type="text/css" />
+	<script type="text/javascript" src="../fckeditor.js"></script>
+	<script type="text/javascript">
 
 function FCKeditor_OnComplete( editorInstance )
@@ -24,4 +23,7 @@
 function FCKeditor_OnAfterSetHTML( editorInstance )
 {
+	if ( editorInstance.EditMode != FCK_EDITMODE_WYSIWYG )
+		return ;
+
 	// Get the actual color from the combo.
 	var sColor = document.getElementById('ActualColor').value ;
@@ -40,44 +42,36 @@
 }
 
-			</script>
-	</head>
-	<body>
-		<h1>FCKeditor - Test 009</h1>
-		<P>
-			<STRONG>Expected results</STRONG> : The user should be able to background color 
-			of the editor by code.<BR>
-			<STRONG>Configurations</STRONG>: Default<BR>
-			<STRONG>Steps to&nbsp;Reproduce</STRONG>:
-		</P>
-		<OL>
-			<LI>
-			Wait the editor to load.
-			<LI>
-			Type some text.
-			<LI>
-			Change the background color using the combo.
-			<LI>
-			Type more text.
-			<LI>
-			Switch to source view.
-			<LI>
-			Switch back to WYSIWYG. The background color must be the same.
-			<LI>
-			Repeate steps 3 to 6.
-			<LI>
-				Submit the form.</LI></OL>
-		<P>
-			<hr>
-		<P>
-		Select a color for the background:<br>
+	</script>
+</head>
+<body>
+	<h1>
+		FCKeditor - Test 009</h1>
+	<p>
+		<strong>Expected results</strong>: The user should be able to background color of
+		the editor by code.<br />
+		<strong>Configurations</strong>: Default<br />
+		<strong>Steps to Reproduce</strong>:
+	</p>
+	<ol>
+		<li>Wait the editor to load.</li>
+		<li>Type some text.</li>
+		<li>Change the background color using the combo.</li>
+		<li>Type more text.</li>
+		<li>Switch to source view.</li>
+		<li>Switch back to WYSIWYG. The background color must be the same.</li>
+		<li>Repeate steps 3 to 6.</li>
+		<li>Submit the form.</li></ol>
+	<hr />
+	<p>
+		Select a color for the background:<br />
 		<select id="ActualColor" onchange="SetActualColor();">
-			<option value="white" selected>White</option>
+			<option value="white" selected="selected">White</option>
 			<option value="red">Red</option>
 			<option value="green">Green</option>
 			<option value="gold">Gold</option>
 		</select>
-		</P>
-		<form action="sampleposteddata.asp" method="post" target="_blank">
-			<script type="text/javascript">
+	</p>
+	<form action="sampleposteddata.asp" method="post" target="_blank">
+		<script type="text/javascript">
 <!--
 // Automatically calculates the editor base path based on the _samples directory.
@@ -91,8 +85,8 @@
 oFCKeditor.Create() ;
 //-->
-			</script>
-			<br>
-			<input type="submit" value="Submit">
-		</form>
-	</body>
+		</script>
+		<br />
+		<input type="submit" value="Submit" />
+	</form>
+</body>
 </html>
Index: /FCKeditor/trunk/editor/_source/classes/fckdomrange_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckdomrange_ie.js	(revision 97)
+++ /FCKeditor/trunk/editor/_source/classes/fckdomrange_ie.js	(revision 98)
@@ -29,4 +29,15 @@
 		
 		this._UpdateElementInfo() ;
+	}
+	else
+	{
+		var oControl = oSel.createRange().item(0) ;
+		
+		if ( oControl )
+		{
+			this._Range.setStartBefore( oControl ) ;
+			this._Range.setEndAfter( oControl ) ;
+			this._UpdateElementInfo() ;
+		}
 	}
 }
@@ -72,6 +83,10 @@
 			// The following trick is needed so IE makes collapsed selections
 			// inside empty blocks visible (expands the block).
-			oIERange.pasteHTML('&nbsp;') ;
-			oIERange.moveStart( 'character', -1 ) ;
+			try
+			{
+				oIERange.pasteHTML('&nbsp;') ;
+				oIERange.moveStart( 'character', -1 ) ;
+			}
+			catch (e){}
 			oIERange.select() ;
 			oIERange.pasteHTML('') ;
Index: /FCKeditor/trunk/editor/_source/internals/fck_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 97)
+++ /FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 98)
@@ -65,8 +65,11 @@
 function Doc_OnKeyDown()
 {
-	var e = FCK.EditorWindow.event ;
-	
-	if ( !( e.keyCode >=16 && e.keyCode <= 18 ) )
-		Doc_OnKeyDownUndo() ;
+	if ( FCK.EditorWindow )
+	{
+		var e = FCK.EditorWindow.event ;
+		
+		if ( !( e.keyCode >=16 && e.keyCode <= 18 ) )
+			Doc_OnKeyDownUndo() ;
+	}
 	return true ;
 }
Index: /FCKeditor/trunk/editor/lang/pt-br.js
===================================================================
--- /FCKeditor/trunk/editor/lang/pt-br.js	(revision 97)
+++ /FCKeditor/trunk/editor/lang/pt-br.js	(revision 98)
@@ -203,6 +203,6 @@
 // Link Dialog
 DlgLnkWindowTitle	: "Hiperlink",
-DlgLnkInfoTab		: "Informações do hiperlink",
-DlgLnkTargetTab		: "Informações de destino",
+DlgLnkInfoTab		: "Informações",
+DlgLnkTargetTab		: "Destino",
 
 DlgLnkType			: "Tipo de hiperlink",
@@ -216,5 +216,5 @@
 DlgLnkAnchorByName	: "Pelo Nome da âncora",
 DlgLnkAnchorById	: "Pelo Id do Elemento",
-DlgLnkNoAnchors		: "(Não há âncoras disponíveis neste documento)",		//REVIEW : Change < and > with ( and )
+DlgLnkNoAnchors		: "(Não há âncoras disponíveis neste documento)",
 DlgLnkEMail			: "Endereço E-Mail",
 DlgLnkEMailSubject	: "Assunto da Mensagem",
@@ -224,5 +224,5 @@
 
 DlgLnkTarget		: "Destino",
-DlgLnkTargetFrame	: "<quadro>",
+DlgLnkTargetFrame	: "<frame>",
 DlgLnkTargetPopup	: "<janela popup>",
 DlgLnkTargetBlank	: "Nova Janela (_blank)",
Index: /FCKeditor/trunk/editor/plugins/autogrow/fckplugin.js
===================================================================
--- /FCKeditor/trunk/editor/plugins/autogrow/fckplugin.js	(revision 97)
+++ /FCKeditor/trunk/editor/plugins/autogrow/fckplugin.js	(revision 98)
@@ -55,4 +55,7 @@
 function FCKAutoGrow_SetListeners()
 {
+	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+		return ;
+
 	FCK.EditorWindow.attachEvent( 'onscroll', FCKAutoGrow_Check ) ;
 	FCK.EditorDocument.attachEvent( 'onkeyup', FCKAutoGrow_Check ) ;
Index: /FCKeditor/trunk/editor/plugins/placeholder/fckplugin.js
===================================================================
--- /FCKeditor/trunk/editor/plugins/placeholder/fckplugin.js	(revision 97)
+++ /FCKeditor/trunk/editor/plugins/placeholder/fckplugin.js	(revision 98)
@@ -86,4 +86,7 @@
 	FCKPlaceholders.Redraw = function()
 	{
+		if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+			return ;
+	
 		var aPlaholders = FCK.EditorDocument.body.innerText.match( /\[\[[^\[\]]+\]\]/g ) ;
 		if ( !aPlaholders )
@@ -106,4 +109,7 @@
 	FCKPlaceholders.Redraw = function()
 	{
+		if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+			return ;
+	
 		var oInteractor = FCK.EditorDocument.createTreeWalker( FCK.EditorDocument.body, NodeFilter.SHOW_TEXT, FCKPlaceholders._AcceptNode, true ) ;
 
