UNPKG

@atlaskit/editor-plugin-content-insertion

Version:

Content insertion plugin for @atlaskit/editor-core

32 lines (31 loc) 1.14 kB
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model'; import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import type { Transaction } from '@atlaskit/editor-prosemirror/state'; type Position = { $from: ResolvedPos; $to: ResolvedPos; }; type InsertBlockNodeProps = { node: PMNode; position: Position; tr: Transaction; }; export declare const insertBlockNode: ({ node, tr, position }: InsertBlockNodeProps) => Transaction; type InsertInlineNodeOrFragmentProps = { maybeFragment: Fragment | PMNode; position: Position; selectInlineNode: boolean; tr: Transaction; }; export declare const insertInlineNodeOrFragment: ({ maybeFragment, tr, position, selectInlineNode, }: InsertInlineNodeOrFragmentProps) => Transaction; type InsertProseMirrorContentProps = { node: PMNode | Fragment; position: { $from: ResolvedPos; $to: ResolvedPos; }; selectNodeInserted: boolean; tr: Transaction; }; export declare const insertProseMirrorContent: ({ tr, node, position, selectNodeInserted, }: InsertProseMirrorContentProps) => void; export {};