Features
-
Added support for the paragraph-like editor feature. It is now possible to customize the editable element's tag name, classes, styles, and attributes by passing
config.root.elementorconfig.roots.main.elementthrough the integration.The configuration value can be a plain string (tag name) or an object:
<template> <ckeditor :editor="BalloonEditor" :config="config" /> </template> <script setup> import { BalloonEditor } from 'ckeditor5'; const config = { root: { element: { name: 'article', classes: [ 'my-editor', 'custom-class' ], styles: { color: 'red' }, attributes: { role: 'textbox' } } } }; </script>
To configure the root as a paragraph-like (inline-content only) editor, also pass
modelElement: '$inlineRoot':const config = { root: { element: 'h1', modelElement: '$inlineRoot', initialData: 'Document title', placeholder: 'Enter title...' } };
For editors that use the Vue-rendered element as their editable (such as Inline or Balloon editor), the editable falls back to the
tagNameprop (divby default) when no element definition is provided in the config. For the Classic editor, which creates its own editable internally,config.root.element(orconfig.roots.main.element) should always be provided explicitly.The
tagNameproperty has been deprecated in favor of this new configuration.
Other changes
- Readme simplification.