diff --git a/sample/index.html b/sample/index.html index 84f1c1b..b9a07d6 100644 --- a/sample/index.html +++ b/sample/index.html @@ -49,6 +49,9 @@

CKEditor 5 – React Component – development sample

return React.createElement( CKEditor.CKEditor, { editor: ClassicEditor, data: this.state.documents[ this.state.documentID ], + watchdogConfig: { + crashNumberLimit: 10 + }, id: this.state.documentID, onReady: editor => { window.editor = editor; diff --git a/src/ckeditor.jsx b/src/ckeditor.jsx index d2399ec..352a833 100644 --- a/src/ckeditor.jsx +++ b/src/ckeditor.jsx @@ -388,6 +388,7 @@ CKEditor.propTypes = { editor: PropTypes.func.isRequired, data: PropTypes.string, config: PropTypes.object, + watchdogConfig: PropTypes.object, onChange: PropTypes.func, onReady: PropTypes.func, onFocus: PropTypes.func, diff --git a/src/ckeditorcontext.jsx b/src/ckeditorcontext.jsx index 9e875fc..76e8e51 100644 --- a/src/ckeditorcontext.jsx +++ b/src/ckeditorcontext.jsx @@ -97,6 +97,7 @@ CKEditorContext.propTypes = { id: PropTypes.string, isLayoutReady: PropTypes.bool, context: PropTypes.func, + watchdogConfig: PropTypes.object, config: PropTypes.object, onReady: PropTypes.func, onError: PropTypes.func diff --git a/tests/ckeditor.jsx b/tests/ckeditor.jsx index 333e5f4..388e7c3 100644 --- a/tests/ckeditor.jsx +++ b/tests/ckeditor.jsx @@ -272,7 +272,7 @@ describe( ' Component', () => { } ); expect( constructorSpy.called ).to.equal( true ); - expect( constructorSpy.firstCall.args[ 1 ] ).to.equal( myWatchdogConfig ); + expect( constructorSpy.firstCall.args[ 1 ] ).to.deep.equal( myWatchdogConfig ); CKEditor._EditorWatchdog = EditorWatchdog; } );