Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-mention

Package Overview
Dependencies
Maintainers
1
Versions
691
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-mention

Mention feature for CKEditor 5.

  • 43.3.0-alpha.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
207K
decreased by-15.44%
Maintainers
1
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 24 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc