@oteam-io/ckeditor5-emojis
v1.0.8
Published
Emojis feature for CKEditor 5.
Downloads
9
Maintainers
Readme
CKEditor 5 Emojis plugin
Emoji plugin using a modified version of the ckeditor5 SpecialCharacters plugin.
Setup
- Installation
To install it, run:
npm i --save @oteam-io/ckeditor5-emojis
- Importing modules
Import the Emojis plugin with all optional categories. If you want to exclude some category, don't import it.
import {
Emojis, EmojisActivity, EmojisFlags, EmojisFood, EmojisNature, EmojisObjects, EmojisPeople,
EmojisPlaces, EmojisSymbols
} from '@oteam-io/ckeditor5-emojis/src';
- Add imported modules to plugins
Add the Emoji plugin and optional categories to CKEditor plugins.
Add plugin to build:
InlineEditor
.create( document.querySelector( '#editor' ), {
plugins: [
...,
Emojis,
EmojisPeople,
EmojisNature,
EmojisPlaces,
EmojisFood,
EmojisActivities,
EmojisObjects,
EmojisSymbols,
EmojisFlags,
],
} )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
or add plugin to custom editor builder:
InlineEditor.builtinPlugins = [
...
Emojis,
EmojisPeople,
EmojisNature,
EmojisPlaces,
EmojisFood,
EmojisActivities,
EmojisObjects,
EmojisSymbols,
EmojisFlags,
]
- Add the Emoji plugin to toolbar
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: [
...,
'emojis',
'|',
'undo',
'redo'
]
},
};
- Enjoy
Emoji Set
Emojis are divided into categories:
- All
- Activities
- Food
- Flags
- Nature
- Objects
- People
- Places
- Symbols
You can choose specific categories or import all of them.