Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@alisowski/codemirror-extensions-mentions

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alisowski/codemirror-extensions-mentions

Relative line numbers Extensions for CodeMirror6.

latest
Source
npmnpm
Version
4.23.11
Version published
Maintainers
1
Created
Source

Mentions Extensions

Buy me a coffee npm version

Mentions Extensions for CodeMirror6.

Mentions Extensions

Install

npm install @uiw/codemirror-extensions-mentions --save

Usage

import CodeMirror from '@uiw/react-codemirror';
import { mentions } from '@uiw/codemirror-extensions-mentions';

const users = [
  { label: '@Walter White' },
  { label: '@皮皮鲁' },
  { label: '@鲁西西' },
  { label: '@中本聪' },
  { label: '@サトシ・ナカモト' },
  { label: '@野比のび太' },
  { label: '@성덕선' },
];

function App() {
  return <CodeMirror value="" height="200px" extensions={[mentions(users)]} />;
}
export default App;
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { mentions } from '@uiw/codemirror-extensions-mentions';

const users = [
  { label: '@Walter White' },
  { label: '@皮皮鲁' },
  { label: '@鲁西西' },
  { label: '@中本聪' },
  { label: '@サトシ・ナカモト' },
  { label: '@野比のび太' },
  { label: '@성덕선' },
];

const state = EditorState.create({
  doc: 'my source code',
  extensions: [mentions(users)],
});

const view = new EditorView({
  parent: document.querySelector('#editor'),
  state,
});

Contributors

As always, thanks to our amazing contributors!

Made with github-action-contributors.

License

Licensed under the MIT License.

Keywords

codemirror

FAQs

Package last updated on 17 Apr 2025

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