EmojiConfig
The configuration of the Emoji feature.
Read more about configuring the Emoji feature.
ClassicEditor
.create( {
emoji: ... // Emoji feature options.
} )
.then( ... )
.catch( ... );Copy codeProperties
definitions?: Array<EmojiDefinition>module:emoji/emojiconfig~EmojiConfig#definitionsThe emoji definitions to use instead of downloading them from URL.
Use this option to bundle the emoji database with your application, for example, when the Content Security Policy of the page does not allow downloading it. The definitions must have the same structure as the database hosted on the CKEditor 5 CDN.
Copy codeimport definitions from './emoji/en.json'; ClassicEditor .create( { plugins: [ Emoji, ... ], emoji: { definitions } } ) .then( ... ) .catch( ... );If this option is provided, it takes precedence over the
emoji.definitionsUrlandemoji.versionoptions, which are ignored.definitionsUrl?: stringmodule:emoji/emojiconfig~EmojiConfig#definitionsUrlThe URL from which the emoji definitions should be loaded.
Copy codeClassicEditor .create( { plugins: [ Emoji, ... ], emoji: { definitionsUrl: '' } } ) .then( ... ) .catch( ... );If the
emoji.definitionsoption is provided,definitionsUrlis ignored as the passed definitions take precedence over the URL.dropdownLimit?: numbermodule:emoji/emojiconfig~EmojiConfig#dropdownLimitThe maximum number of emojis displayed in the dropdown list.
Copy codeClassicEditor .create( { plugins: [ Emoji, ... ], emoji: { dropdownLimit: 4 } } ) .then( ... ) .catch( ... );Defaults to
6module:emoji/emojiconfig~EmojiConfig#skinToneInitial skin tone for the emojis that support skin tones.
Copy codeClassicEditor .create( { plugins: [ Emoji, ... ], emoji: { skinTone: 'medium' } } ) .then( ... ) .catch( ... );Defaults to
'default'useCustomFont?: booleanmodule:emoji/emojiconfig~EmojiConfig#useCustomFontThe availability of the emoji depends on the operating system. Different systems will have different Unicode support.
By default, the feature tries to filter out emojis not supported by your operating system. This means that instead of previewing an emoji, the feature renders a black square.
If you customize the emoji availability and appearance, it is highly recommended to disable the filtering mechanism because it uses a font built into your system instead of the provided custom font.
module:emoji/emojiconfig~EmojiConfig#versionThe emoji database version.
Copy codeClassicEditor .create( { plugins: [ Emoji, ... ], emoji: { version: 15 } } ) .then( ... ) .catch( ... );If the
emoji.definitionsUrloption is provided,versionis ignored as the defined URL takes precedence over theversion. The same applies to theemoji.definitionsoption.