UNPKG

@atlaskit/editor-plugin-hyperlink

Version:

Hyperlink plugin for @atlaskit/editor-core

28 lines 849 B
import React from 'react'; import { LINKING_BUTTON, LINKING_GROUP, LINKING_GROUP_RANK, LINKING_SECTION, LINKING_SECTION_RANK } from '@atlaskit/editor-common/toolbar'; import { LinkButton } from './toolbar/LinkButton'; export const getToolbarComponents = api => { const toolbarComponents = [{ type: LINKING_GROUP.type, key: LINKING_GROUP.key, parents: [{ type: LINKING_SECTION.type, key: LINKING_SECTION.key, rank: LINKING_SECTION_RANK[LINKING_GROUP.key] }] }, { type: LINKING_BUTTON.type, key: LINKING_BUTTON.key, parents: [{ type: LINKING_GROUP.type, key: LINKING_GROUP.key, rank: LINKING_GROUP_RANK[LINKING_BUTTON.key] }], component: () => { return /*#__PURE__*/React.createElement(LinkButton, { api: api }); } }]; return toolbarComponents; };