v3.0.0
BREAKING CHANGES
-
The
onInit
property was renamed toonReady
and can be called multiple times (after the initialization and after the component is ready when an error occurred). -
The entry point of the package has changed. The default import was removed since the package provides more than a single component now. Use
import { CKEditor } from '@ckeditor/ckeditor5-react';
instead of
import CKEditor from '@ckeditor/ckeditor5-react';
Features
-
Support for the
config.initialData
option in the configuration object when creating the<CKEditor>
component. When passing the[data]
property and theinitialData
value in the configuration object, the later one will take precedence and a warning message will be logged on the console. (commit) -
The
<CKEditor>
component contains the built-in watchdog feature. Closes #118. (commit) -
Introduced the
<CKEditorContext>
component that supports the context feature. (commit) -
Added the
id
property which is used to distinguish different documents. When this property changes, the component restarts the underlying editor instead of setting data on it, which allows e.g. for switching between collaboration documents and fixes a couple of issues (e.g. theonChange
event no longer fires during changing the document). Closes #168, #169. (commit) -
The
onError()
callback will be called with two arguments. The first one will be an error object (as it was before the release 3+). A second argument is an object that contains two properties:. (commit)-
{String} phase
:'initialization'|'runtime'
- Informs when the error has occurred (during the editor/context initialization or after the initialization). -
{Boolean} willEditorRestart
- Whentrue
, it means that the editor component will restart itself. -
{Boolean} willContextRestart
- Whentrue
, it means that the context component will restart itself.The
willEditorRestart
property will not appear when the error has occurred in the context feature.
ThewillContextRestart
property will not appear when the error has occurred in the editor.
-
Both components (<CKEditor>
and <CKEditorContext>
) will internally use the Watchdog
class that restarts the editor or context when an error occurs.