@atlaskit/editor-plugin-hyperlink
Version:
Hyperlink plugin for @atlaskit/editor-core
21 lines • 783 B
JavaScript
import React from 'react';
import { HYPERLINK_MENU_ITEM, MEDIA_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
import { MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
import { HyperlinkQuickInsertMenuItem } from './HyperlinkQuickInsertMenuItem';
export var getHyperlinkQuickInsertComponents = function getHyperlinkQuickInsertComponents(_ref) {
var api = _ref.api;
return [{
key: HYPERLINK_MENU_ITEM.key,
type: HYPERLINK_MENU_ITEM.type,
parents: [{
key: MEDIA_SECTION.key,
type: MEDIA_SECTION.type,
rank: MEDIA_SECTION_RANK[HYPERLINK_MENU_ITEM.key]
}],
component: function component() {
return /*#__PURE__*/React.createElement(HyperlinkQuickInsertMenuItem, {
api: api
});
}
}];
};