UNPKG

@atlaskit/editor-plugin-loom

Version:

Loom plugin for @atlaskit/editor-core

31 lines 1.24 kB
import React from 'react'; import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages'; import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher'; import { LOOM_MENU_ITEM, MEDIA_SECTION } from '@atlaskit/editor-common/quick-insert/keys'; import { MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank'; import { LoomQuickInsertMenuItem } from './LoomQuickInsertMenuItem'; export var getLoomQuickInsertComponents = function getLoomQuickInsertComponents(_ref) { var api = _ref.api; return [{ key: LOOM_MENU_ITEM.key, type: LOOM_MENU_ITEM.type, parents: [{ key: MEDIA_SECTION.key, type: MEDIA_SECTION.type, rank: MEDIA_SECTION_RANK[LOOM_MENU_ITEM.key] }], match: createQuickInsertMatcher(function (_ref2) { var formatMessage = _ref2.formatMessage; return { description: formatMessage(messages.recordVideoDescription), keywords: ['loom', 'record', 'video'], title: formatMessage(messages.recordVideo) }; }), component: function component() { return /*#__PURE__*/React.createElement(LoomQuickInsertMenuItem, { api: api }); } }]; };