Files
outline/shared/editor/queries/isInNotice.ts
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

14 lines
440 B
TypeScript

import type { EditorState } from "prosemirror-state";
import { isNodeActive } from "./isNodeActive";
/**
* Returns true if the selection is inside a notice block.
*
* @param state The editor state.
* @returns True if the selection is inside a notice block.
*/
export function isInNotice(state: EditorState): boolean {
const { nodes } = state.schema;
return nodes.container_notice && isNodeActive(nodes.container_notice)(state);
}