Skip to content

v9.1.0

Latest
Compare
Choose a tag to compare
@CKEditorBot CKEditorBot released this 05 Sep 09:49
· 9 commits to master since this release

We added an onChangeInitializedEditors callback to CKEditorContext component to allow tracking newly initialized editors within the JSX React tree.

Example

<CKEditorContext
  context={ ClassicEditor.Context }
  contextWatchdog={ ClassicEditor.ContextWatchdog }
  onChangeInitializedEditors={ editors => {
    console.log( editors );
  }}
>
  <CKEditor
    editor={ ClassicEditor }
    data="<h2>Editor</h2>"
    contextItemMetadata={{
      name: 'editor1',
      user: { id: '2' }
    }}
  />

  <CKEditor
    editor={ ClassicEditor }
    data="<h2>Another Editor</h2><p>... in a common Context</p>"
    contextItemMetadata={{
      name: 'editor2'
    }}
  />
</CKEditorContext>

onChangeInitializedEditors will be called twice in the example above:

  1. First log: { editor1: ... }
  2. Second log: { editor1: ..., editor2: ... }

⚠️ Order of initialization is not guaranteed. editor2 might be initialized before editor1.

Features

  • Add an onChangeInitializedEditors callback to CKEditorContext to allow tracking of newly initialized editors within the JSX React tree. Closes #513. (commit)
  • Experimental: Added useCKEditorCloud hook for managing asynchronous loading of CKEditor from a CDN. (commit)
  • Experimental: Added withCKEditorCloud HOC to simplify CKEditor integration with CDN in React components. (commit)

Bug fixes

  • Image upload should be now possible in demos. (commit)
  • Indent button is no longer disabled in manual demos. (commit)
  • Manual demos should point to existing documentation links. (commit)