UNPKG

@atlaskit/editor-plugin-tasks-and-decisions

Version:

Tasks and decisions plugin for @atlaskit/editor-core

13 lines (12 loc) 808 B
import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model'; import { Selection } from '@atlaskit/editor-prosemirror/state'; export declare const normalizeTaskItemsSelection: (selection: Selection) => Selection; /** * Gets the blockTaskItem node and whether it has a paragraph child if it exists near the given resolved position. * @param $from resolved position, typically from the selection when the selection is an empty selection at the start of a task item * @returns {{ blockTaskItemNode: PMNode; hasParagraph: boolean } | false} An object with blockTaskItemNode and hasParagraph if found, or false if there is no blockTaskItem node. */ export declare const findBlockTaskItem: ($from: ResolvedPos) => { blockTaskItemNode: PMNode; hasParagraph: boolean; } | false;