What is @ckeditor/ckeditor5-editor-inline?
@ckeditor/ckeditor5-editor-inline is a package that provides an inline editor for CKEditor 5. This editor allows users to edit content directly within the context of the page, without the need for a separate editing interface. It is particularly useful for applications where a seamless editing experience is desired.
What are @ckeditor/ckeditor5-editor-inline's main functionalities?
Basic Inline Editor Initialization
This code initializes a basic inline editor on an HTML element with the ID 'editor'. It demonstrates how to create an instance of the inline editor and handle the promise returned by the create method.
const InlineEditor = require('@ckeditor/ckeditor5-editor-inline/src/inlineeditor');
InlineEditor.create(document.querySelector('#editor'))
.then(editor => {
console.log('Editor was initialized', editor);
})
.catch(error => {
console.error(error.stack);
});
Adding Plugins
This code demonstrates how to initialize the inline editor with additional plugins such as Bold and Italic. It also configures the toolbar to include buttons for these plugins.
const InlineEditor = require('@ckeditor/ckeditor5-editor-inline/src/inlineeditor');
const Essentials = require('@ckeditor/ckeditor5-essentials/src/essentials');
const Bold = require('@ckeditor/ckeditor5-basic-styles/src/bold');
const Italic = require('@ckeditor/ckeditor5-basic-styles/src/italic');
InlineEditor.create(document.querySelector('#editor'), {
plugins: [ Essentials, Bold, Italic ],
toolbar: [ 'bold', 'italic' ]
})
.then(editor => {
console.log('Editor with plugins was initialized', editor);
})
.catch(error => {
console.error(error.stack);
});
Custom Configuration
This code shows how to initialize the inline editor with a custom configuration. It sets up a toolbar with specific items, changes the language to Spanish, and adds a placeholder text.
const InlineEditor = require('@ckeditor/ckeditor5-editor-inline/src/inlineeditor');
InlineEditor.create(document.querySelector('#editor'), {
toolbar: {
items: [ 'bold', 'italic', 'link' ]
},
language: 'es',
placeholder: 'Type your text here...'
})
.then(editor => {
console.log('Custom configured editor was initialized', editor);
})
.catch(error => {
console.error(error.stack);
});
Other packages similar to @ckeditor/ckeditor5-editor-inline
quill
Quill is a modern WYSIWYG editor built for compatibility and extensibility. It provides a similar inline editing experience and is highly customizable with a wide range of modules and themes. Compared to @ckeditor/ckeditor5-editor-inline, Quill offers a more lightweight and flexible approach but may lack some of the advanced features and plugins available in CKEditor 5.
tinymce
TinyMCE is another popular WYSIWYG editor that offers both inline and classic editing modes. It is highly configurable and supports a wide range of plugins and integrations. TinyMCE is comparable to @ckeditor/ckeditor5-editor-inline in terms of functionality and extensibility, but it has a different API and plugin architecture.
froala-editor
Froala Editor is a lightweight WYSIWYG HTML editor that offers inline editing capabilities. It is known for its clean design and ease of use. Froala Editor provides a similar user experience to @ckeditor/ckeditor5-editor-inline but focuses more on simplicity and performance.
44.2.0 (February 12, 2025)
We are happy to announce the release of CKEditor 5 v44.2.0.
Release Highlights
🖥️ Enhanced Source Code Editing (⭐)
Introducing new premium feature: Enhanced Source Code Editing. It displays the source code in a dialog and is compatible with all editor types. It offers syntax highlighting, code completion, code folding, and other advanced functionalities. Additionally, it supports both HTML and Markdown formats.
📤 Uploadcare and image optimizer (⭐)
We have integrated the Uploadcare image manager service, enabling you to upload and edit images to their cloud environment. You can upload files from various sources, including local devices, social media, or online drives ensuring rapid uploads. The integration takes care of efficient media delivery with responsive images mechanism, making sure your users will save bandwidth and have faster website loading. You can also optimize images with the built-in image editor which offers a range of features, such as cropping, rotating, flipping, photo filters and more. All this directly from the editor, try it out!
🖼️ Image Merge Fields (⭐)
Image merge fields are a new type of merge fields, dedicated for image placeholders. They maintain all standard image interactions, like styling, resizing or captions (in which you can use merge fields too!) At the same time, they keep all merge fields functionalities, like data previews or document export integration. In the document data, image merge fields are represented like other images, however their src
attribute is set to a respective merge field, for example, src="{{CompanyLogo}}"
, making them easy to post-process!
📝 Track Changes Preview (⭐)
We have added the preview mode that displays a document with all suggestions accepted. Accessible from the track changes dropdown, this modal preview helps check the final content without extensive markers.
😀 Emoji support
They are here! 🎉 🥳 🎊 Insert emojis effortlessly in the editor by typing :
or through a user-friendly emoji picker. This feature enhances the richness of your content by allowing quick access to a wide range of emojis.
⚡ Performance improvements: Part 4
Here comes the final batch of the planned performance improvements in the editor loading speed area, that we worked on through a couple of past releases.
- A new caching mechanism in
Mapper
now handles model-to-view mappings, substantially improving performance for loading and saving data. - Images with specified height and width automatically use
[loading="lazy"]
in the editing area, optimizing the loading time (read more on MDN). This attribute is only applied during editing to enhance the loading efficiency of images, and it does not reflect in the final data output.
We are greatly satisfied with the improved editor loading times. At the same time, we acknowledge some other problematic areas, and we will keep delivering more performance-related improvements in the future.