What is @ckeditor/ckeditor5-editor-balloon?
@ckeditor/ckeditor5-editor-balloon is a package that provides a balloon editor for CKEditor 5. This type of editor is designed to appear in a floating balloon, which can be positioned relative to the content being edited. It is particularly useful for inline editing scenarios where the editor should not take up a lot of space and should be contextually relevant to the content being edited.
What are @ckeditor/ckeditor5-editor-balloon's main functionalities?
Basic Balloon Editor Initialization
This code demonstrates how to initialize a basic balloon editor using the @ckeditor/ckeditor5-editor-balloon package. The editor is created and attached to a DOM element with the id 'editor'.
const BalloonEditor = require('@ckeditor/ckeditor5-editor-balloon/src/ballooneditor');
const ClassicEditor = require('@ckeditor/ckeditor5-build-classic');
BalloonEditor.create(document.querySelector('#editor'))
.then(editor => {
console.log('Editor was initialized', editor);
})
.catch(error => {
console.error(error.stack);
});
Customizing the Balloon Editor
This code sample shows how to customize the balloon editor by adding specific plugins and configuring the toolbar. In this example, the editor is initialized with the Essentials, Bold, and Italic plugins, and the toolbar is configured to include buttons for bold and italic text.
const BalloonEditor = require('@ckeditor/ckeditor5-editor-balloon/src/ballooneditor');
const EssentialsPlugin = require('@ckeditor/ckeditor5-essentials/src/essentials');
const BoldPlugin = require('@ckeditor/ckeditor5-basic-styles/src/bold');
const ItalicPlugin = require('@ckeditor/ckeditor5-basic-styles/src/italic');
BalloonEditor.create(document.querySelector('#editor'), {
plugins: [ EssentialsPlugin, BoldPlugin, ItalicPlugin ],
toolbar: [ 'bold', 'italic' ]
})
.then(editor => {
console.log('Editor was initialized with custom plugins', editor);
})
.catch(error => {
console.error(error.stack);
});
Handling Editor Events
This example demonstrates how to handle events in the balloon editor. Specifically, it listens for changes to the editor's data and logs the new data to the console whenever it changes.
const BalloonEditor = require('@ckeditor/ckeditor5-editor-balloon/src/ballooneditor');
BalloonEditor.create(document.querySelector('#editor'))
.then(editor => {
editor.model.document.on('change:data', () => {
console.log('The data has changed!', editor.getData());
});
})
.catch(error => {
console.error(error.stack);
});
Other packages similar to @ckeditor/ckeditor5-editor-balloon
quill
Quill is a modern WYSIWYG editor built for compatibility and extensibility. It offers a similar inline editing experience with a floating toolbar, making it comparable to the balloon editor provided by @ckeditor/ckeditor5-editor-balloon. Quill is known for its ease of use and flexibility in customization.
tinymce
TinyMCE is another popular WYSIWYG editor that provides a rich text editing experience. It offers a variety of configurations, including inline editing with a floating toolbar, similar to the balloon editor in CKEditor 5. TinyMCE is highly customizable and widely used in various web applications.
froala-editor
Froala Editor is a lightweight WYSIWYG HTML editor that offers inline editing capabilities with a floating toolbar. It is similar to the balloon editor in CKEditor 5 in terms of functionality and is known for its performance and ease of integration.
44.0.0 (December 2, 2024)
Release Highlights
We are excited to introduce CKEditor 5 v44.0.0, a release packed with high impact updates designed to enhance your editing experience and simplify access to our premium offers. Here's whatβs new:
π Self-service plans: Simplified access to premium features
We are introducing flexible self-service plans that put you in control with full transparency. Now, you can:
π‘ Important for current users:
If you are upgrading to v44.0.0+, ensure a smooth transition by updating your license keys in the editor, as we implemented a new format of the key. To get the new key, visit the Customer Portal. You can also refer to our license key and activation guide for help with logging in to the portal.
π£ The open-source licensing remains unchanged. However, config.licenseKey
is now a required property in the editor configuration. Use 'GPL'
for installations under the GPL terms. Read more in the update guide.
π Bookmarks: Organize your content with ease
Say hello to Bookmarks, a long-awaited feature that simplifies content navigation within the editor. With this release, you can:
- Add anchors as reference points within text.
- Link to the newly created bookmarks in the editor to navigate to specific locations within complex documents, such as contracts or technical manuals.
π Future updates to Bookmarks and the linking experience are planned for the upcoming releases. Follow progress and share your feedback on GitHub.
β‘ Performance improvements: Faster table rendering
The current release includes another stride towards improving the performance aspect of the editor, this time focusing on how tables are handled in the content. Implemented optimizations have made table rendering 3x faster, with the average load time of a document with a very long, complex tables dropping from around 4.5 seconds to just 1.5 seconds.