@linhx/ckeditor5-emoji2
v0.0.1
Published
Inserting an image as emoji to CKEditor 5.
Downloads
24
Maintainers
Readme
@linhx/ckeditor5-emoji2
Inserting images as emoji.
Usage
npm i @linhx/ckeditor5-emoji2
Read Installing plugins
Import css
import '@linhx/ckeditor5-emoji2/theme/emoji2.css';
Add to toolbar
toolbar: {
items: [
...
'emoji2',
...
]
},
Config plugin
{
emoji2: {
class: string, // your css class of emoji, default is "em"
defaultGroup: string, // the default group name, for selecting the default group tab when showing the grid
groups: Map<string, Array<{key: string; name?: string; imgUrl: string}>>, // Map of groups of emojis, e.g. { people: [{ key: 'grinning', name: 'Grinning', imgUrl: '/url' }] }
}
}
Use my default emojis (the messenger emojis)
Import emoji groups:
import { emojiGroups } from '@linhx/ckeditor5-emoji2/src/emojisList'
{ emoji2: { defaultGroup: 'p', // people groups: emojiGroups } }
Download
https://github.com/linhx/ckeditor5-emoji2/tree/master/sample/assets/emojis
and copy to your public assets folder, make sure emoji images can be accessed throughyourdomain.com/assets/emojis/<name>.png
And this is the result