Features
-
The
useMultiRootEditorhook now returnsaddRootandremoveRoothelpers directly. Previously, adding or removing a root required manually manipulating thedataandattributesstate outside the hook. You can now call them directly:const { addRoot, removeRoot } = useMultiRootEditor( props ); await addRoot({ name: 'my-root', data: '<p>Hello</p>', attributes: { order: 10 }, editableOptions: { element: 'section', placeholder: 'Start typing...', label: 'My section' } }); await removeRoot( 'my-root' );
-
The
<CKEditor>component now supports paragraph-like editor configurations. Whenconfig.root.element(orconfig.roots.main.element) is provided, you can customize the tag name, CSS classes and inline styles of the editable element instead of relying on the default plain<div>. -
Each editable root in the multi-root editor can now be configured independently with its own HTML element type, placeholder text and accessible label. Pass an
editableOptionsobject toaddRootto control theelement(e.g.'section','article'),placeholderand assistive-technologylabelfor that specific root.
Other changes
- Readme simplification.