@atlaskit/editor-plugin-expand
Version:
Expand plugin for @atlaskit/editor-core
29 lines (28 loc) • 1.77 kB
TypeScript
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
import { Selection } from '@atlaskit/editor-prosemirror/state';
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
import type { InsertMethod } from '../types';
export declare const setExpandRef: (ref?: HTMLDivElement | null) => Command;
export declare const deleteExpandAtPos: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (expandNodePos: number, expandNode: PMNode) => Command;
export declare const deleteExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
export declare const updateExpandTitle: ({ title, nodeType, pos, __livePage, }: {
__livePage: boolean;
nodeType: NodeType;
pos: number;
title: string;
}) => Command;
export declare const toggleExpandExpanded: ({ editorAnalyticsAPI, pos, nodeType, __livePage, }: {
__livePage: boolean;
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
nodeType: NodeType;
pos: number;
}) => Command;
export declare const createExpandNode: (state: EditorState) => PMNode | null;
export declare const insertExpandWithInputMethod: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InsertMethod) => Command;
export declare const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
export declare const focusTitle: (pos: number) => Command;
export declare const focusIcon: (expand: Node) => Command;
export declare const setSelectionInsideExpand: (expandPos: number) => Command;
export declare const toggleExpandWithMatch: (_selection: Selection) => EditorCommand;