Index: _samples/ui_usererror.html
===================================================================
--- _samples/ui_usererror.html (revision 0)
+++ _samples/ui_usererror.html (revision 0)
@@ -0,0 +1,61 @@
+
+
+
+
+ Replace Textareas by Class Name - CKEditor Sample
+
+
+
+
+
+
+
+
+
+
+ CKEditor Sample
+
+
+
+
+
+
+
+
+
+
Index: _source/core/editor.js
===================================================================
--- _source/core/editor.js (revision 5248)
+++ _source/core/editor.js (working copy)
@@ -414,6 +414,17 @@
this.on( 'mode', updateCommandsMode, null, null, 1 );
+ // Make it possible to override the original alert on user error with a custom
+ // implementation pointing to a global named CKEDITOR_USERERROR.
+ this.on( 'userError', function( evt )
+ {
+ var userErrorFunction = window.CKEDITOR_USERERROR;
+ if ( userErrorFunction )
+ userErrorFunction.call( this, evt );
+ else
+ alert( evt.data.errorString );
+ });
+
initConfig( this, instanceConfig );
};
})();
Index: _source/plugins/find/dialogs/find.js
===================================================================
--- _source/plugins/find/dialogs/find.js (revision 5248)
+++ _source/plugins/find/dialogs/find.js (working copy)
@@ -604,8 +604,10 @@
dialog.getValueOf( 'find', 'txtFindCaseChk' ),
dialog.getValueOf( 'find', 'txtFindWordChk' ),
dialog.getValueOf( 'find', 'txtFindCyclic' ) ) )
- alert( editor.lang.findAndReplace
- .notFoundMsg );
+ editor.fire( 'userError', {
+ errorString : editor.lang.findAndReplace.notFoundMsg,
+ errorType : 'findandreplace_notfound'
+ });
}
}
]