EmojiText

Render Custom Emoji in Text. Supports local and remote emojis. Remote emojis are loadad and cached using Nuke

Usage

Remote emoji

EmojiText(markdown: "Hello World :my_emoji:",
          emojis: [RemoteEmoji(shortcode: "my_emoji", url: /* URL to emoji */)])

Local emoji

EmojiText(markdown: "Hello World :my_emoji:",
          emojis: [LocalEmoji(shortcode: "my_emoji", image: /* some UIImage */)])

Configuration

Remote emojis are replaced by a placeholder image. Default is the SF Symbol square.dashed but you can provide a placeholder image with

.environment(\.placeholderEmoji, /* some UIImage */)

Remote emojis use ImagePipeline.shared from Nuke but you can provide a custom pipline with

.environment(\.imagePipeline, ImagePipeline())

License

See LICENSE

GitHub

View Github