Use ckeditors emoji picker instead of our own plugin

This commit is contained in:
Jan Böhmer 2025-08-03 20:22:00 +02:00
parent e87720a838
commit db1b91fc32
7 changed files with 19 additions and 26 deletions

View file

@ -22,9 +22,7 @@ import SpecialCharactersEssentials from 'ckeditor5';
import {Plugin} from 'ckeditor5';
const emoji = require('emoji.json');
export default class SpecialCharactersEmoji extends Plugin {
export default class SpecialCharactersGreek extends Plugin {
init() {
const editor = this.editor;
@ -32,9 +30,6 @@ export default class SpecialCharactersEmoji extends Plugin {
//Add greek characters to special characters
specialCharsPlugin.addItems('Greek', this.getGreek());
//Add Emojis to special characters
specialCharsPlugin.addItems('Emoji', this.getEmojis());
}
getGreek() {
@ -96,14 +91,4 @@ export default class SpecialCharactersEmoji extends Plugin {
{ title: 'san', character: 'Ϻ' },
];
}
getEmojis() {
//Map our emoji data to the format the plugin expects
return emoji.map(emoji => {
return {
title: emoji.name,
character: emoji.char
};
});
}
}