fix: Indent/outdent list controls, closes #6974

This commit is contained in:
Tom Moor
2024-06-08 21:51:52 -04:00
parent 2f495f0add
commit 808415b906
34 changed files with 80 additions and 62 deletions

View File

@@ -1,6 +1,6 @@
import { EditorState } from "prosemirror-state";
import isMarkActive from "./isMarkActive";
import isNodeActive from "./isNodeActive";
import { isMarkActive } from "./isMarkActive";
import { isNodeActive } from "./isNodeActive";
type Options = {
/** Only check if the selection is inside a code block. */
@@ -16,10 +16,7 @@ type Options = {
* @param options The options.
* @returns True if the selection is inside a code block or code mark.
*/
export default function isInCode(
state: EditorState,
options?: Options
): boolean {
export function isInCode(state: EditorState, options?: Options): boolean {
const { nodes, marks } = state.schema;
if (!options?.onlyMark) {