@atlaskit/editor-plugin-emoji
Version:
Emoji plugin for @atlaskit/editor-core
31 lines (30 loc) • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getEmojiQuickInsertComponents = void 0;
var _messages = require("@atlaskit/editor-common/messages");
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
var _EmojiQuickInsertMenuItem = require("./EmojiQuickInsertMenuItem");
var getEmojiQuickInsertComponents = exports.getEmojiQuickInsertComponents = function getEmojiQuickInsertComponents() {
return [{
key: _keys.EMOJI_MENU_ITEM.key,
type: _keys.EMOJI_MENU_ITEM.type,
parents: [{
key: _keys.MEDIA_SECTION.key,
type: _keys.MEDIA_SECTION.type,
rank: _rank.MEDIA_SECTION_RANK[_keys.EMOJI_MENU_ITEM.key]
}],
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref) {
var formatMessage = _ref.formatMessage;
return {
description: formatMessage(_messages.toolbarInsertBlockMessages.emojiDescription),
shortcut: ':',
title: formatMessage(_messages.toolbarInsertBlockMessages.emoji)
};
}),
component: _EmojiQuickInsertMenuItem.EmojiQuickInsertMenuItem
}];
};