v9.1.0
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:
- First log:
{ editor1: ... } - Second log:
{ editor1: ..., editor2: ... }
editor2 might be initialized before editor1.
Features
- Add an
onChangeInitializedEditorscallback toCKEditorContextto allow tracking of newly initialized editors within the JSX React tree. Closes #513. (commit) - Experimental: Added
useCKEditorCloudhook for managing asynchronous loading of CKEditor from a CDN. (commit) - Experimental: Added
withCKEditorCloudHOC to simplify CKEditor integration with CDN in React components. (commit)