UNPKG

@atlaskit/editor-plugin-content-insertion

Version:

Content insertion plugin for @atlaskit/editor-core

20 lines (19 loc) 561 B
import { createInsertNodeAPI } from './pm-plugins/api'; /** * Content insertion plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor` * from `@atlaskit/editor-core`. */ export const contentInsertionPlugin = ({ api }) => { var _api$analytics; const { actions, commands } = createInsertNodeAPI(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions); return { name: 'contentInsertion', actions, commands }; };