v7.0.0
We are excited to announce a new major release of the Vue integration.
In this release, we have introduced the following breaking changes that should make using the integration more intuitive and easier.
-
Composition API: The integration has been rewritten in Composition API, which follows the recommended way of writing components in Vue 3.
-
Vue 3.4+: The minimum required version of Vue is now 3.4+ because we are using the Generics and
defineModel()
features to provide better typings for theeditor
prop and component events. -
ESM-first: Besides the UMD build, the integration is now available in ESM format. In most projects, the new ESM build should be automatically prioritized by bundlers and other tools.
-
Changed exports: We have changed how the Vue plugin and component are exported. The Vue plugin is no longer the
default
export but is exported asCkeditorPlugin
. The component is now exported asCkeditor
instead ofdefault.component
.Here's a comparison of how you can import the Vue plugin that registers a global
<ckeditor>
component:// Before the release. import CKEditor from '@ckeditor/ckeditor5-vue'; // After the release. import { CkeditorPlugin } from '@ckeditor/ckeditor5-vue';
If you prefer to use a local component instead of a global component, here's a comparison of how you can import it:
// Before the release. import CKEditor from '@ckeditor/ckeditor5-vue'; const component = CKEditor.component; // After the release. import { Ckeditor } from '@ckeditor/ckeditor5-vue'; const component = Ckeditor;
-
Remove the
editor
argument from thedestroy
event: Thedestroy
event no longer has aneditor
argument since it was alwaysnull
. -
New name of the global variable: The name of the global variable used in the UMD build changed from
CKEditor
toCKEDITOR_VUE
.
BREAKING CHANGES
- Bump required version to Vue 3.4+. See #282.
- Change the global name used in the UMD build from
CKEditor
toCKEDITOR_VUE
. - Export the component as
Ckeditor
instead ofdefault.component
. Closes #284. - Migrate to Composition API. Closes #172.
- Migrate to ESM. See ckeditor/ckeditor5#16616.
- Remove argument from the
destroy
event, as it was alwaysnull
. Closes #283. - Rename main package exports to
CkeditorPlugin
andCkeditor
.
Bug fixes
- Change the global name used in the UMD build from
CKEditor
toCKEDITOR_VUE
to match the new convention. See ckeditor/ckeditor5#16736. (commit) - Fix the component properties and event types. (commit)
- Use type of the passed
editor
prop rather than genericEditor
type. Closes #282. (commit)
Other changes
- Rename exports to improve name of the editor component in Vue. (commit)