{"id":13416420,"url":"https://github.com/zurb/tribute-rb","last_synced_at":"2025-06-12T06:40:43.232Z","repository":{"id":138631427,"uuid":"64410904","full_name":"zurb/tribute-rb","owner":"zurb","description":"Tribute.js @mentions for the Rails Asset Pipeline","archived":false,"fork":false,"pushed_at":"2019-10-15T16:36:42.000Z","size":136,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-07-31T21:56:39.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/zurb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-07-28T16:21:47.000Z","updated_at":"2021-06-25T00:24:00.000Z","dependencies_parsed_at":"2024-01-15T23:27:10.031Z","dependency_job_id":"c4aa5e00-7492-4172-b75b-4880cb378658","html_url":"https://github.com/zurb/tribute-rb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Ftribute-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Ftribute-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Ftribute-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Ftribute-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurb","download_url":"https://codeload.github.com/zurb/tribute-rb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358837,"owners_count":21090442,"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-07-30T21:00:58.559Z","updated_at":"2025-04-11T07:30:56.411Z","avatar_url":"https://github.com/zurb.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Tribute\n\n[![Gem Version](https://badge.fury.io/rb/tribute.svg)](https://badge.fury.io/rb/tribute)\n\nA cross-browser @mention engine written in native JS, no dependencies. Tested in Firefox, Chrome, iOS Safari, Safari, IE 9+, Edge 12+, Android 4+, and Windows Phone.\n\n## Installation\n\nAdd this line to your application's Gemfile, then bundle:\n\n```ruby\ngem 'tribute'\n```\n\nAdd the following to your `app/assets/javascripts/application.js`:\n\n```js\n*= require tribute\n```\n\nThen, in your `app/assets/stylesheets/application.css`:\n\n```css\n//= require tribute\n```\n\n## Initializing\n\nThere are two ways to initialize Tribute, by passing an array of \"collections\" or by passing one collection object.\n\n```js\nvar tribute = new Tribute({\n  values: [\n    {key: 'Phil Heartman', value: 'pheartman'},\n    {key: 'Gordon Ramsey', value: 'gramsey'}\n  ]\n})\n```\n\nYou can pass multiple collections on initialization by passing in an array of collection objects to `collection`.\n\n```js\nvar tribute = new Tribute({\n  collection: []\n})\n```\n\n### Attaching to elements\n\nOnce initialized, Tribute can be attached to an `input`, `textarea`, or an element that supports `contenteditable`.\n\n```html\n\u003cdiv id=\"caaanDo\"\u003eI'm Mr. Meeseeks, look at me!\u003c/div\u003e\n\n\u003cdiv class=\"mentionable\"\u003eSome text here.\u003c/div\u003e\n\u003cdiv class=\"mentionable\"\u003eSome more text over here.\u003c/div\u003e\n\n\u003cscript\u003e\n  tribute.attach(document.getElementById('caaanDo'));\n\n  // also works with NodeList\n  tribute.attach(document.querySelectorAll('.mentionable'));\n\u003c/script\u003e\n```\n\nFor more usage information, see the official [Tribute.js README](https://github.com/zurb/tribute#tribute).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Ftribute-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurb%2Ftribute-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Ftribute-rb/lists"}