UNPKG

@atlaskit/editor-plugin-content-insertion

Version:

Content insertion plugin for @atlaskit/editor-core

71 lines (53 loc) 1.85 kB
<!-- API Report Version: 2.3 --> ## API Report File for "@atlaskit/editor-plugin-content-insertion" > Do not edit this file. This report is auto-generated using > [API Extractor](https://api-extractor.com/). > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports) ### Table of contents - [Main Entry Types](#main-entry-types) - [Peer Dependencies](#peer-dependencies) ### Main Entry Types <!--SECTION START: Main Entry Types--> ```ts import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics'; import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics'; import type { CommandDispatch } from '@atlaskit/editor-common/types'; import type { EditorState } from '@atlaskit/editor-prosemirror/state'; import type { Fragment } from '@atlaskit/editor-prosemirror/model'; import type { NextEditorPlugin } from '@atlaskit/editor-common/types'; import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model'; // @public (undocumented) export type ContentInsertionPlugin = NextEditorPlugin< 'contentInsertion', { actions: InsertNodeAPI; dependencies: [AnalyticsPlugin]; } >; // @public export const contentInsertionPlugin: ContentInsertionPlugin; // @public (undocumented) export type InsertNodeAPI = { insert: (props: InsertNodeConfig) => boolean; }; // @public (undocumented) type InsertNodeConfig = { node: Fragment | Node_2; state: EditorState | null | undefined; dispatch: CommandDispatch | undefined; options: { selectNodeInserted: boolean; analyticsPayload?: AnalyticsEventPayload; }; }; // (No @packageDocumentation comment for this package) ``` <!--SECTION END: Main Entry Types--> ### Peer Dependencies <!--SECTION START: Peer Dependencies--> ```json { "react": "^16.8.0" } ``` <!--SECTION END: Peer Dependencies-->