UNPKG

@atlaskit/editor-plugin-loom

Version:

Loom plugin for @atlaskit/editor-core

27 lines 1.04 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 const getLoomQuickInsertComponents = ({ api }) => [{ 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(({ formatMessage }) => ({ description: formatMessage(messages.recordVideoDescription), keywords: ['loom', 'record', 'video'], title: formatMessage(messages.recordVideo) })), component: () => /*#__PURE__*/React.createElement(LoomQuickInsertMenuItem, { api: api }) }];