Skip to content

v11.2.0

Latest

Choose a tag to compare

@CKEditorBot CKEditorBot released this 08 Jun 08:57
v11.2.0
9fc9812

Features

  • The useMultiRootEditor hook now returns addRoot and removeRoot helpers directly. Previously, adding or removing a root required manually manipulating the data and attributes state 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. When config.root.element (or config.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 editableOptions object to addRoot to control the element (e.g. 'section', 'article'), placeholder and assistive-technology label for that specific root.

Other changes

  • Readme simplification.