@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
10 lines (9 loc) • 445 B
TypeScript
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
import type { Command } from '../types';
/**
* Function will add wrapping node.
* 1. If currently selected blocks can be wrapped in the wrapper type it will wrap them.
* 2. If current block can not be wrapped inside wrapping block it will create a new block below selection,
* and set selection on it.
*/
export declare function wrapSelectionIn(type: NodeType): Command;