Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5518)
+++ /CKEditor/trunk/CHANGES.html	(revision 5519)
@@ -95,4 +95,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/5688">#5688</a> : Duplicate ids are used in dialog definition.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5570">#5570</a> : [IE] First enabling SCAYT blind cursor in editor.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5741">#5741</a> : Enable SCAYT cause error in multiple editor instances.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5719">#5719</a> : [IE] 'change' dialog event should not be triggered when dialog is already closed.</li>
 		<li>Updated the following language files:<ul>
Index: /CKEditor/trunk/_source/plugins/scayt/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/scayt/plugin.js	(revision 5518)
+++ /CKEditor/trunk/_source/plugins/scayt/plugin.js	(revision 5519)
@@ -12,8 +12,6 @@
 {
 	var commandName 	= 'scaytcheck',
-		openPage		= '',
-		scayt_paused	= null,
-		scayt_control_id = null;
-
+		openPage		= '';
+		
 	// Checks if a value exists in an array
 	function in_array(needle, haystack)
@@ -56,6 +54,6 @@
 
 					// Call scayt_control.focus when SCAYT loaded
-					// and only if editor has focus
-					if ( editor.focusManager.hasFocus )
+					// and only if editor has focus and scayt control creates at first time (#5720)
+					if ( editor.focusManager.hasFocus && !plugin.isControlRestored( editor ) )
 						this.focus();
 
@@ -77,6 +75,6 @@
 			}
 			// needs for restoring a specific scayt control settings
-			if ( scayt_control_id )
-				oParams.id = scayt_control_id;
+			if ( plugin.getControlId(editor) )
+				oParams.id = plugin.getControlId(editor);
 
 			var scayt_control = new window.scayt( oParams );
@@ -108,5 +106,5 @@
 			plugin.uiTabs = fTabs;
 			try {
-				scayt_control.setDisabled( scayt_paused === false );
+				scayt_control.setDisabled( plugin.isPaused( editor ) === false );
 			} catch (e) {}
 
@@ -140,11 +138,14 @@
 					if ( scayt_instance )
 					{
-						scayt_paused = scayt_instance.paused = !scayt_instance.disabled;
+						plugin.setPaused( editor, !scayt_instance.disabled );
 						// store a control id for restore a specific scayt control settings
-						scayt_control_id = scayt_instance.id;
+						plugin.setControlId( editor, scayt_instance.id );
 						scayt_instance.destroy( true );
 						delete plugin.instances[ editor.name ];
 					}
 				}
+				// Catch on source mode switch off (#5720)
+				else if ( ev.data.name == 'source'  && editor.mode == 'source' )
+					plugin.markControlRestore( editor )
 			});
 
@@ -164,5 +165,5 @@
 				delete plugin.instances[ editor.name ];
 				// store a control id for restore a specific scayt control settings
-				scayt_control_id = scayt_instance.id;
+				plugin.setControlId( editor, scayt_instance.id );
 				scayt_instance.destroy( true );
 			});
@@ -278,9 +279,62 @@
 			createInstance();
 	};
-
-	CKEDITOR.plugins.scayt =
+	
+CKEDITOR.plugins.scayt =
 	{
 		engineLoaded : false,
 		instances : {},
+		// Data storage for SCAYT control, based on editor instances
+		controlInfo : {},
+		setControlInfo : function( editor, o )
+		{
+			if ( editor && editor.name && typeof ( this.controlInfo[ editor.name ] ) != 'object' )
+				this.controlInfo[ editor.name ] = {};
+			
+			for ( var infoOpt in o )
+				this.controlInfo[ editor.name ][ infoOpt ] = o[ infoOpt ];
+		},
+		isControlRestored : function ( editor )
+		{
+			if ( editor &&
+					editor.name &&
+					this.controlInfo[ editor.name ] )
+			{
+				return this.controlInfo[ editor.name ].restored ;
+			}
+			return false;
+		},
+		markControlRestore : function ( editor )
+		{
+			this.setControlInfo( editor,{ restored:true } );
+		},
+		setControlId: function (editor, id)
+		{
+			this.setControlInfo( editor,{ id:id } );
+		},
+		getControlId: function (editor)
+		{
+			if ( editor &&
+					editor.name &&
+					this.controlInfo[ editor.name ] &&
+					this.controlInfo[ editor.name ].id )
+			{
+				return this.controlInfo[ editor.name ].id
+			}
+			return null;
+		},
+		setPaused: function ( editor , bool )
+		{
+			this.setControlInfo( editor,{ paused:bool } );
+		},
+		isPaused: function (editor)
+		{
+			if ( editor &&
+					editor.name && 
+					this.controlInfo[editor.name] )
+			{
+				return this.controlInfo[editor.name].paused ;
+			}
+			return undefined;
+		},
 		getScayt : function( editor )
 		{
@@ -307,5 +361,5 @@
 			else if ( this.engineLoaded == -1 )			// We are waiting.
 				return CKEDITOR.on( 'scaytReady', function(){ onEngineLoad.apply( editor ); } );	// Use function(){} to avoid rejection as duplicate.
-
+			
 			CKEDITOR.on( 'scaytReady', onEngineLoad, editor );
 			CKEDITOR.on( 'scaytReady', function()
@@ -741,5 +795,5 @@
 
 			editor.addRemoveFormatFilter && editor.addRemoveFormatFilter( scaytFilter );
-
+			
 		}
 	});
