Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Etherpad Lite | 13,993 | 6 days ago | 1 | November 10, 2021 | 173 | apache-2.0 | JavaScript | |||
Etherpad: A modern really-real-time collaborative document editor. | ||||||||||
Lighttable | 11,683 | a year ago | 179 | mit | Clojure | |||||
The Light Table IDE ⛺ | ||||||||||
Dillinger | 7,545 | 3 months ago | 109 | mit | HTML | |||||
The last Markdown editor, ever. | ||||||||||
Draft Js Plugins | 4,028 | 340 | 204 | 3 days ago | 37 | August 21, 2019 | 10 | mit | TypeScript | |
React Plugin Architecture for Draft.js including Slack-Like Emojis, FB-Like Mentions and Stickers | ||||||||||
Scribe | 3,608 | 49 | 6 | 3 years ago | 68 | March 06, 2017 | 109 | apache-2.0 | JavaScript | |
DEPRECATED: A rich text editor framework for the web platform | ||||||||||
Bytemd | 3,517 | 24 | 13 days ago | 63 | July 21, 2022 | 36 | mit | TypeScript | ||
Hackable Markdown Editor and Viewer | ||||||||||
Awesome Xcode Extensions | 2,547 | 2 years ago | Ruby | |||||||
Awesome native Xcode extensions. | ||||||||||
Hallo | 2,478 | 3 years ago | 1 | June 23, 2015 | 110 | mit | CoffeeScript | |||
Simple rich text editor (contentEditable) for jQuery UI | ||||||||||
Awesome Draft Js | 2,415 | a year ago | ||||||||
Awesome list of Draft.js resources | ||||||||||
Dialogic | 2,170 | 3 days ago | 133 | mit | GDScript | |||||
💬 Create dialogs, characters and scenes to display conversations in your Godot games. |
This is a modification on top of the existing plugin by ivirabyan/jquery-mentions , I have added support for npm and CommonJS
Adds mentioning support to your text fields.
It's a more robust alternative to podio's jquery.mentionsInput plugin.
Live example: http://ivirabyan.github.io/jquery-mentions/
Advantages over jquery.mentionsInput:
Solved issues of jquery.mentionsInput:
For this plugin to work you need to include jQuery Autocomplete to your page.
var data = [
{value: 'alex', uid: 'user:1'},
{value: 'andrew', uid: 'user:2'},
{value: 'angry birds', uid: 'game:5'},
{value: 'assault', uid: 'game:3'}
];
$('textarea').mentionsInput({source: data});
$('textarea').mentionsInput({source: 'http://example.com/users.json'})
The url is given a query paremeter term
, like http://example.com/users.json?term=Foo
and must return a json list of matched values (like the above).
You can also provide custom function to source
argument, for more info take a look at jQuery Autocomplete docs.
$('textarea').mentionsInput('getValue');
$('textarea').mentionsInput('setValue', 'Hello, @[Alex](user:1)');
$('textarea').mentionsInput('getValue')
-> Hello, @[Alex](user:1)
$('textarea').mentionsInput('getRawValue')
-> Hello, Alex
Don't use textarea value directly, because it contains special characters, used by plugin internally. Always use methods.
WARNING: This plugin does not currently work with editors, which use iframe.
To create WYSIWYG editor on your site, usually you create <textarea>
tag, and then your editor replaces it with editor's visual representation, including element with contenteditable="true"
attribute. So, to make mentionsInput
plugin work, you need to apply the plugin to element with contenteditable="true"
. If you apply the plugin to your <textarea>
, it'll not work.
For example:
<textarea id="content"></textarea>
<script>
$('#content').myEditor();
// Now your editor is initialized, find element with contenteditable.
// For particular plugin you may find a better way to get such an element,
// maybe even write your own plugin.
var elEditable = $('[contenteditable=true]');
elEditable.mentionsInput({...});
</script>
Data source for the autocomplete. See jQuery Autocomplete API for available values.
Source data is an array of objects with uid
and value
properties: [{uid: '123', value: 'Alex'}, ...]
. If you want to display an icon in dropdown list, you can add an image
property to objects in the array.
String to add to selected mention when it is inserted in text. Can be usefull if you wish to automatically insert a space after mention. For that case: $textarea.mentionsInput({suffix: ' '})
Note: only supported for textarea and input. Contenteditable does not support this option yet.
Char which trigger autocomplete, default value is '@'. Multiple chars are supported, so if you set trigger='@#', both will trigger a search.
Name of the autocomplete widget to use. May be useful when you want to somehow customize appearance of autocomplete widget, for example add headers to items list. You must inherit from widget, used internally (ui.areacomplete
when you use textarea, and ui.editablecomplete
when you use div with contenteditable=true
).
Options to pass to jQuery Autocomplete widget. Default is {delay: 0, autoFocus: true}
.
Returns marked up value.
Returns value without any markup
Takes marked up value as an argument. For example 'Hey, @[alex](user:1)'
.
You can also represent mentions as objects, instead of manually marking them up:
$textarea.mentionsInput('setValue', 'Hey, ', {name: 'alex', uid: 'user:1'})
Returns an array of all mentions contained within the text, like this:
[
{name: 'alex', uid: 'user:1'},
{name: 'andrew', uid: 'user:2'}
]
Clears value. Note that you must use this method insted of manually clearing value of the input
Destroys current instance of the plugin