@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
12 lines (11 loc) • 890 B
TypeScript
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
export declare const isSelectionAtStartOfNode: ($pos: ResolvedPos, parentNode?: ContentNodeWithPos) => boolean;
export declare const isSelectionAtEndOfNode: ($pos: ResolvedPos, parentNode?: ContentNodeWithPos) => boolean;
export declare function atTheEndOfDoc(state: EditorState): boolean;
export declare function atTheBeginningOfDoc(state: EditorState): boolean;
export declare function atTheEndOfBlock(state: EditorState): boolean;
export declare function atTheBeginningOfBlock(state: EditorState): boolean;
export declare function startPositionOfParent(resolvedPos: ResolvedPos): number;
export declare function endPositionOfParent(resolvedPos: ResolvedPos): number;