Open antoine35 opened 6 years ago
According to the docs you should be able to do this by overwriting the toolbar config:
emoji: {
icon: emoji,
className: undefined,
component: undefined,
popupClassName: undefined,
emojis: [
'😀', '😁', '😂', '😃', '😉', '😋', '😎', '😍', '😗', '🤗', '🤔', '😣', '😫', '😴', '😌', '🤓',
'😛', '😜', '😠', '😇', '😷', '😈', '👻', '😺', '😸', '😹', '😻', '😼', '😽', '🙀', '🙈',
'🙉', '🙊', '👼', '👮', '🕵', '💂', '👳', '🎅', '👸', '👰', '👲', '🙍', '🙇', '🚶', '🏃', '💃',
'⛷', '🏂', '🏌', '🏄', '🚣', '🏊', '⛹', '🏋', '🚴', '👫', '💪', '👈', '👉', '👉', '👆', '🖕',
'👇', '🖖', '🤘', '🖐', '👌', '👍', '👎', '✊', '👊', '👏', '🙌', '🙏', '🐵', '🐶', '🐇', '🐥',
'🐸', '🐌', '🐛', '🐜', '🐝', '🍉', '🍄', '🍔', '🍤', '🍨', '🍪', '🎂', '🍰', '🍾', '🍷', '🍸',
'🍺', '🌍', '🚑', '⏰', '🌙', '🌝', '🌞', '⭐', '🌟', '🌠', '🌨', '🌩', '⛄', '🔥', '🎄', '🎈',
'🎉', '🎊', '🎁', '🎗', '🏀', '🏈', '🎲', '🔇', '🔈', '📣', '🔔', '🎵', '🎷', '💰', '🖊', '📅',
'✅', '❎', '💯',
],
},
emoji: emojis: The property is arrary of emoji characters (unicodes). Which are shown in emoji option.
Usage
import React, { Component } from 'react';
import { Editor } from 'react-draft-wysiwyg';
<Editor
toolbarHidden
wrapperClassName="wrapper-class"
editorClassName="editor-class"
toolbarClassName="toolbar-class"
toolbar={{
emoji: {
emojis: [ // New array of custom emojis here ]
}
}}
/>
Yep but those emoji's support only unicode characters as of now.
Hello, Is it possible to have the font-awesome icons as is the case for emojis?
Thks