Emoji plugin using a modified version of the ckeditor5 SpecialCharacters plugin.
To install it, run:
npm i --save @phudak/ckeditor5-emoji
Import the Emoji plugin with all optional categories. If you want to exclude some category, don't import it.
import {
Emoji, EmojiActivity, EmojiFlags, EmojiFood, EmojiNature, EmojiObjects, EmojiPeople,
EmojiPlaces, EmojiSymbols
} from '@phudak/ckeditor5-emoji/src';
Add the Emoji plugin and optional categories to CKEditor plugins.
Add plugin to build:
InlineEditor
.create( document.querySelector( '#editor' ), {
plugins: [
...,
Emoji,
EmojiPeople,
EmojiNature,
EmojiPlaces,
EmojiFood,
EmojiActivity,
EmojiObjects,
EmojiSymbols,
EmojiFlags,
],
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
or add plugin to custom editor builder:
InlineEditor.builtinPlugins = [
...
Emoji,
EmojiPeople,
EmojiNature,
EmojiPlaces,
EmojiFood,
EmojiActivity,
EmojiObjects,
EmojiSymbols,
EmojiFlags,
]
Add plugin to build:
InlineEditor
.create( document.querySelector( '#editor' ), {
plugins: [...],
toolbar: [ ... , 'emoji' ],
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
or add plugin to custom editor builder:
InlineEditor.defaultConfig = {
toolbar: {
items: [
...,
'emoji',
'|',
'undo',
'redo'
]
},
};
You can check my Emoji plugin integration into custom CKEditor builds here:
Emoji are divided into categories:
You can choose specific categories or import all of them.