chore(ckeditor5/plugins): integrate emoji special characters

This commit is contained in:
Elian Doran
2025-05-03 17:14:18 +03:00
parent bf45720f21
commit afb987d4dd
3 changed files with 34 additions and 23 deletions

View File

@@ -0,0 +1,29 @@
import { Plugin, SpecialCharacters } from "ckeditor5";
export default class SpecialCharactersEmojiPlugin extends Plugin {
static get requires() {
return [ SpecialCharacters ];
}
init() {
this.editor.plugins.get('SpecialCharacters').addItems('Emoji', [
{ title: 'smiley face', character: '😊' },
{ title: 'grinning face', character: '😄' },
{ title: 'grinning face with big eyes', character: '😃' },
{ title: 'grinning face with sweat', character: '😅' },
{ title: 'beaming face with smiling eyes', character: '😃' },
{ title: 'neutral face', character: '😐' },
{ title: 'rolling on the floor laughing', character: '🤣' },
{ title: 'face with tears of joy', character: '😂' },
{ title: 'heart', character: '❤️' },
{ title: 'hands pressed together', character: '🙏' },
{ title: 'thumbs up', character: '👍' },
{ title: 'rocket', character: '🚀' },
{ title: '100', character: '💯' },
{ title: 'wind blowing face', character: '🌬️' },
{ title: 'floppy disk', character: '💾' }
], { label: 'Emoji' });
}
}