Code Monkey home page Code Monkey logo

Comments (4)

scttcper avatar scttcper commented on August 24, 2024

yeah i think you pass that to [emoji] need to update doc

from ngx-emoji-mart.

Eraldo avatar Eraldo commented on August 24, 2024

To [emoji]??
I thought I the emoji parameter takes an emoji id, colon emoji name or an emoji object.

Context: I use the emoji picker (mart) to pick an emoji (in this case a custom one) and send the id to server (to store it in my database).
Now on the other end of things, I want to be able to display that custom emoji. (What I get from the server is the id.)

Currently if I provide the custom emoji id to the ngx-emoji tag as the emoji parameter, no emoji gets displayed (which I can understand since it does not "know" what to do with the custom id.

The docs actually did make sense to me. With <ngx-emoji emoji="mycustomid" [custom]="customEmojis"></ngx-emoji> I thought the id would tell which one to use and the custom parameter would inform the component of what custom data to include in the data set.

Another solution idea that I find suitable was to make it possible to provide a way for the EmojiService to add custom emojis. In that case, both the mart and emoji component could find and use the custom emojis and I would only need to provide and setup my custom data once. How about that? I tried to "hack" into the service but failed since the uncompression of the data seems to take place beforehand and I did not find a method to mount my custom emojis.

Anyway I would appreciate guidance on how to make my use case of "picking and displaying a custom emoji" work.

Thanks for the quick reply btw. :)

from ngx-emoji-mart.

scttcper avatar scttcper commented on August 24, 2024

emoji object is what you're passing to [emoji] where the object is your custom emoji. currently the service doesn't support adding custom emojis.

from ngx-emoji-mart.

Eraldo avatar Eraldo commented on August 24, 2024

I have a python backend where I save the emoji ids not the full objects (which also makes more sense to me). Given such a custom emoji id I would like to display the emoji. Why id the custom option gone? It did make a lot of sense to me, just like it works with the mart (picker).

from ngx-emoji-mart.

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.