What is @ckeditor/ckeditor5-mention?
@ckeditor/ckeditor5-mention is a plugin for CKEditor 5 that allows you to implement mention functionality in your editor. This feature is commonly used to mention users, tags, or other entities within the text, similar to how mentions work on social media platforms.
What are @ckeditor/ckeditor5-mention's main functionalities?
Basic Mention
This feature allows you to add basic mention functionality to your CKEditor instance. The example code initializes the editor with a mention feed that triggers when the '@' character is typed, suggesting names like '@Anna', '@Thomas', and '@John'.
ClassicEditor.create(document.querySelector('#editor'), { mention: { feeds: [ { marker: '@', feed: ['@Anna', '@Thomas', '@John'], minimumCharacters: 1 } ] } })
Custom Mention Feed
This feature allows you to use a custom function to provide the mention feed. The example code uses a promise to simulate an asynchronous feed that filters the mention suggestions based on the query.
ClassicEditor.create(document.querySelector('#editor'), { mention: { feeds: [ { marker: '@', feed: (query) => { return new Promise(resolve => { setTimeout(() => { resolve(['@Anna', '@Thomas', '@John'].filter(item => item.includes(query))); }, 100); }); }, minimumCharacters: 1 } ] } })
Multiple Markers
This feature allows you to use multiple markers for different types of mentions. The example code initializes the editor with two mention feeds: one for '@' mentions and another for '#' tags.
ClassicEditor.create(document.querySelector('#editor'), { mention: { feeds: [ { marker: '@', feed: ['@Anna', '@Thomas', '@John'], minimumCharacters: 1 }, { marker: '#', feed: ['#Tag1', '#Tag2', '#Tag3'], minimumCharacters: 1 } ] } })
Other packages similar to @ckeditor/ckeditor5-mention
quill-mention
quill-mention is a plugin for the Quill rich text editor that provides similar mention functionality. It allows you to mention users, tags, or other entities within the text. Compared to @ckeditor/ckeditor5-mention, quill-mention is designed specifically for the Quill editor and offers similar customization options for mention feeds and markers.
draft-js-mention-plugin
draft-js-mention-plugin is a plugin for the Draft.js editor that adds mention functionality. It allows you to mention users, tags, or other entities within the text. This plugin is comparable to @ckeditor/ckeditor5-mention but is tailored for use with the Draft.js framework, offering similar features such as custom mention feeds and multiple markers.
tiptap-extensions
tiptap-extensions is a collection of extensions for the Tiptap editor, including a mention extension. It allows you to implement mention functionality similar to @ckeditor/ckeditor5-mention. The mention extension in tiptap-extensions provides customizable mention feeds and markers, making it a comparable alternative for those using the Tiptap editor.
43.1.0 (September 5, 2024)
We are happy to announce the release of CKEditor 5 v43.1.0.
Release highlights
This release includes important bug fixes and enhancements for the editor:
-
Block merge fields: In contrast to regular, inline merge fields, the block merge fields are designed to represent complex, block-level structures, such as a dynamically generated table, a row of products, or a personalized call-to-action segment. Block merge fields are supposed to be replaced by arbitrary HTML data when the document template is post-processed or exported to a PDF or Word file.
-
Nested dropdown menus: this release introduces a new UI component: nested dropdown menus. They can be used by feature developers to easily provide an advanced user interface where UI elements are organized into a nested menu structure.
-
Customizable accessible label: You can now configure the label for the accessible editable area through the editor settings, ensuring it fits your system’s needs.
-
Improved table and cell border controls: It is now easier to manage both table and cell borders. The table user interface now clearly indicates the default border settings, allowing you to set “no borders” (None
) for tables and cells without any additional configuration.
⚠️ In some cases this update may lead to data changes in the tables’ HTML markup when the editor loads them. However, visually nothing will change, and the experience will be the same.
The full list of enhancements can be found below.