Skip to content

v12.0.0-alpha.0

Pre-release
Pre-release

Choose a tag to compare

@CKEditorBot CKEditorBot released this 22 Sep 11:10
· 44 commits to master since this release
v12.0.0-alpha.0
ed42fdc

BREAKING CHANGES

  • The Watchdog is gone, and with it the automatic restart of a crashed editor. An editor that crashes now stays as it is, with its content and its undo history, instead of being rebuilt from the data it had before. Errors are reported through onError as before, and the <CKEditorContext> component now creates and shares a Context directly.

    CKEditor 5 in version 49 or higher is now required. That is where the error reporting this integration uses appears. The declared peer dependency and the runtime version check were raised to match.

    Compile-breaking for anyone using <CKEditorContext>:

    • The contextWatchdog prop is gone. It used to be required, so every <CKEditorContext contextWatchdog={ ... }> has to drop it.
    • The context prop is now required. It used to be optional, because the watchdog could supply the class instead.
    • onReady receives only the context. Its second argument, the ContextWatchdog, no longer exists. The second argument of onChangeInitializedEditors is now a Context for the same reason.

    Everywhere else:

    • The disableWatchdog and watchdogConfig props were removed from <CKEditor> and useMultiRootEditor(), and watchdogConfig from <CKEditorContext>. There is no watchdog left to disable or configure.
    • The CKEditor#watchdog getter was removed.
    • The onError details object no longer carries willEditorRestart or willContextRestart. Nothing restarts, so there is nothing to announce. It still carries phase, which is 'initialization' or 'runtime' as before.
    • ContextWatchdogContext was renamed to CKEditorContextValueContext, useCKEditorWatchdogContext() to useCKEditorContextValue(), and the ContextWatchdogValue type to CKEditorContextValue. The value they carry is a Context rather than a ContextWatchdog: the watchdog member of the initialized value is now context.
    • CKEditorContextValue's error member is typed as Error, which is what it has always held.

    Integrators who relied on the restart should handle onError themselves — reload the editor, tell the user, or report to their error tracker.

Features

  • The stylesheets loaded by useCKEditorCloud() can now be injected into a shadow root instead of document.head, so the editor styles stay scoped to a web component rather than leaking into the page. Pass the root as targetNode of the injectedStylesheetsLocation option.