Skip to content

v12.0.0-alpha.0

Pre-release
Pre-release

Choose a tag to compare

@CKEditorBot CKEditorBot released this 22 Sep 11:11
· 53 commits to master since this release
v12.0.0-alpha.0
7126f56

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. The error output still reports what happened.

    • 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.

    • The watchdog, editorWatchdogConfig and disableWatchdog inputs were removed from <ckeditor>. There is no watchdog left to pass, configure or disable.

    • If you passed a ContextWatchdog through the watchdog input to share a context between editors, create the Context yourself and pass it in the editor configuration instead:

      const context = await AngularEditor.Context.create( contextConfig );
      
      // Then, in the template: <ckeditor [editor]="Editor" [config]="config">
      config = { context };

      The context is yours now, so destroy it when you are done with it — ContextWatchdog used to own that.

    • The error output now carries the error itself. A runtime crash used to arrive either as null, which is what the watchdog passed where an EventInfo would otherwise go, or as undefined when the editor was an item of a ContextWatchdog. It is now the CKEditorError that escaped. Handlers written against the old shape need updating.

    • An error attributed to a Context rather than to a single editor is not emitted by this component, which reports only what belongs to its own editor. If you share a context and want those, register your own callback with Editor.onEditorError().

    • The DisabledEditorWatchdog class was removed. It existed only to stand in for a watchdog when disableWatchdog was set, which is now the only behaviour.

    • The editor input no longer requires the editor class to expose a static EditorWatchdog, and requires a static onEditorError instead — every editor class has one.

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

Features

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