mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 14:49:55 +02:00
Use ckeditors emoji picker instead of our own plugin
This commit is contained in:
parent
e87720a838
commit
db1b91fc32
7 changed files with 19 additions and 26 deletions
|
@ -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
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue