{"id":20511037,"url":"https://github.com/sean-codes/js-mention","last_synced_at":"2025-04-13T22:41:27.951Z","repository":{"id":27737805,"uuid":"115071252","full_name":"sean-codes/js-mention","owner":"sean-codes","description":"@ mention / tag input plugin using JavaScript","archived":false,"fork":false,"pushed_at":"2023-04-20T01:35:47.000Z","size":2602,"stargazers_count":21,"open_issues_count":12,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T13:01:44.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sean-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-22T03:12:46.000Z","updated_at":"2025-02-01T05:07:34.000Z","dependencies_parsed_at":"2024-11-15T20:34:28.524Z","dependency_job_id":"1992a574-a1ae-453e-af5f-168810ca7ddb","html_url":"https://github.com/sean-codes/js-mention","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fjs-mention","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fjs-mention/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fjs-mention/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fjs-mention/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sean-codes","download_url":"https://codeload.github.com/sean-codes/js-mention/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794419,"owners_count":21162613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:34:17.452Z","updated_at":"2025-04-13T22:41:27.906Z","avatar_url":"https://github.com/sean-codes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-mention\n@ mention / tag input plugin using plain JavaScript\n\n![example](https://github.com/sean-codes/js-mention/blob/master/js-mention.gif?raw=true)\n\nDemo: [demo](https://sean-codes.github.io/js-mention/demo/reversed.html)\n\n\n## Include:\n```html\n  \u003clink rel=\"stylesheet\" href=\"/mention.css\"\u003e\n  \u003cscript src=\"/mention.js\"\u003e\n```\n\n## Basic:\n\u003e Each option only requires a name field\n\n```js\n  var myMention = new Mention({\n      input: document.getElementById('myTextArea'),\n      options: [\n         { name: 'WideEye' },\n         { name: 'LiquidLuck' },\n         { name: 'PolyJuice' }\n      ]\n   })\n```\n\n## Get the mentions\n\n```js\n   var mentions = myMention.collect()\n```\n\n## Settings\n\n### Watch for changes\n\nWhen defining the mention object add update function\n```js\n  var myMention = new Mention({\n    ...\n    ,\n    update: function() {\n       console.log(this.collect())\n    }\n  })\n```\n\n### Option display template\n\nWhen defining the mention object add template function.\n```js\n  var myMention = new Mention({\n    ...\n    ,\n    template: function(option) {\n       return '@' + option.name\n    }\n  })\n```\n\n### Match / Search function\n\nWhen defining the mention object add match function.\n```js\n  var myMention = new Mention({\n    ...\n    ,\n    match: function(word, option) {\n       // Match not case sensitive\n       return option.name.toLowerCase().startsWith(word.toLowerCase())\n    }\n  })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-codes%2Fjs-mention","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsean-codes%2Fjs-mention","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-codes%2Fjs-mention/lists"}