Giter Club home page Giter Club logo

Comments (7)

PostMidnight avatar PostMidnight commented on May 27, 2024 1

Hi @c0bra it did work for me, however take a look at the quill page there may be some other issues related to yours.

from quill-emoji.

kembly avatar kembly commented on May 27, 2024 1

So I had to go another route. I forked this repo and exported emoji-map.js as a named export.

Then I used the map to convert emoji names to unicode characters like so:

import { EmojiMap } from 'quill-emoji';

const emoji = 'smile';
const code = String.fromCodePoint(parseInt(EmojiMap[emoji].unicode, 16));

This has worked for me in sending SMS content, etc.

@c0bra, you can actually just get it from this package without forking: https://github.com/contentco/quill-emoji/blob/master/src/module-emoji.js

import QuillEmoji from 'quill-emoji';
const { ShortNameEmoji } = QuillEmoji;
console.log(ShortNameEmoji.DEFAULTS.emojiList);

You can then just re-implement their mapping in your own code:

const emojiMap = {};

emojiList.forEach((emojiListObject) => {
    emojiMap[emojiListObject.name] = emojiListObject;
});

from quill-emoji.

cwhite-connectfirst avatar cwhite-connectfirst commented on May 27, 2024

@PostMidnight can you try the latest version of quill-emoji and report back?

from quill-emoji.

PostMidnight avatar PostMidnight commented on May 27, 2024

looking good, thank you!

from quill-emoji.

c0bra avatar c0bra commented on May 27, 2024

@PostMidnight did it work for you after updating or did you have to do something else? I'm experiencing your issue with version 0.1.7.

from quill-emoji.

PostMidnight avatar PostMidnight commented on May 27, 2024

Hi @c0bra , the new emoji works well. Quill however may need further work. See the quill page for documented issues and potential solutions.

from quill-emoji.

c0bra avatar c0bra commented on May 27, 2024

So I had to go another route. I forked this repo and exported emoji-map.js as a named export.

Then I used the map to convert emoji names to unicode characters like so:

import { EmojiMap } from 'quill-emoji';

const emoji = 'smile';
const code = String.fromCodePoint(parseInt(EmojiMap[emoji].unicode, 16));

This has worked for me in sending SMS content, etc.

from quill-emoji.

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.