Code Monkey home page Code Monkey logo

Comments (3)

ealush avatar ealush commented on June 4, 2024 1

Hey,
So this has two parts.

  1. When connected to the internet, you will not see a blank emoji. When emojis fail to load, I just remove them from the list altogether.
    2.The emojis do not come with the package itself, but instead are served via cdn. Otherwise, in most cases, it would just be too heavy and too slow.

On an intranet, you'll have to self host the emojis, and provide the url for it. These are the steps to do it:
a. Download an emoji library from a place like https://github.com/iamcal/emoji-data/tree/master/img-apple-64
b. when rendering the picker, add an emojiUrl prop with the image location, currently: https://cdn.jsdelivr.net/gh/iamcal/emoji-data@master/img-apple-64

<EmojiPicker emojiUrl="https://cdn.jsdelivr.net/gh/iamcal/emoji-data@master/img-apple-64"/>

You'll need to provide a different url from within the intranet.

from emoji-picker-react.

ealush avatar ealush commented on June 4, 2024 1

So basically, as I said, I listen to these load failures and remove those from state. What you can do is basically attach an event listener to the picker and listen to load errors.

from emoji-picker-react.

matheusrgarcia avatar matheusrgarcia commented on June 4, 2024

Thanks, is there a way to check if the images from the emoji itself didn't load?

from emoji-picker-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.