{"id":13504136,"url":"https://github.com/fastred/EmojiTextView","last_synced_at":"2025-03-29T19:30:44.623Z","repository":{"id":56909962,"uuid":"63504972","full_name":"fastred/EmojiTextView","owner":"fastred","description":"Tap to swap out words with emojis. Inspired by Messages.app on iOS 10.","archived":true,"fork":false,"pushed_at":"2016-10-23T15:50:26.000Z","size":611,"stargazers_count":339,"open_issues_count":1,"forks_count":13,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-06T00:03:21.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/fastred.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}},"created_at":"2016-07-16T22:38:16.000Z","updated_at":"2024-05-24T21:09:50.000Z","dependencies_parsed_at":"2022-08-21T04:20:27.791Z","dependency_job_id":null,"html_url":"https://github.com/fastred/EmojiTextView","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FEmojiTextView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FEmojiTextView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FEmojiTextView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastred%2FEmojiTextView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastred","download_url":"https://codeload.github.com/fastred/EmojiTextView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246234664,"owners_count":20745012,"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-31T23:00:55.071Z","updated_at":"2025-03-29T19:30:44.219Z","avatar_url":"https://github.com/fastred.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Layout"],"readme":"# EmojiTextView\n\nTap to swap out words with emojis. Works with any `UITextView`. Heavily inspired by Messages.app on iOS 10.\n\nCreated by [Arkadiusz Holko][holko] ([@arekholko][twitter]).\n\n![Demo GIF](https://raw.githubusercontent.com/fastred/EmojiTextView/master/demo.gif)\n\n## Usage\n\nAdd a property of `EmojiController` type to a class that holds your `UITextView` instance, e.g. a view controller:\n\n```swift\nvar emojiController: EmojiController?\n```\n\nThen, initialize `EmojiController` by passing it your text view (e.g. in `viewDidLoad()`):\n\n```swift\nemojiController = EmojiController(textView: textView)\n```\n\nThat's it! 🎉\n\n## Customization\n\n`EmojiController` provides three points of customization through properties:\n\n- `mapping` – contains a mapping from words to an array of emojis\n- `textHighlightingFactory` – creates a new instance of an object conforming to `TextHighlighting` protocol; each instance of that object is responsible for highlighting a single word\n- `defaultAttributes` - attributes (as in `NSAttributedString`) of a text that's not replaceable with emoji\n\n## Installation\n\nEmojiTextView is available through [CocoaPods](http://cocoapods.org). To install it simply add the following line to your Podfile:\n\n```\npod \"EmojiTextView\", \"0.0.1\"\n```\n\nThen you can import it with:\n\n```swift\nimport EmojiTextView\n```\n\n## Requirements\n\niOS 9 and above.\n\n## Future Improvements\n\n- Should the emoji replacement be enabled only when the emoji keyboard is selected? It probably requires the use of the private API as `UITextInputMode` doesn't help here.\n- If there's more than one emoji match for a given word there should be an ability to choose which one we want to use.\n- **(EASY)** There should be an option to switch back from an emoji to the full word. Hint: add an attribute with the original word to the part of the string replaced by an emoji.\n\n## Credits\n\n- Emoji keyword library is based on [emojilib][emojilib].\n\n[emojilib]: https://github.com/muan/emojilib\n[holko]: http://holko.pl\n[twitter]: https://twitter.com/arekholko\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastred%2FEmojiTextView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastred%2FEmojiTextView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastred%2FEmojiTextView/lists"}