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.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.