import { toParagraph } from "../../base/BaseSchema/index.js";
import { headingType } from "./HeadingSpecs/index.js";
export const resetHeading = (state, dispatch, view) => {
    const { selection } = state;
    if (selection.empty &&
        selection.$from.parent.type === headingType(state.schema) &&
        view?.endOfTextblock('backward', state)) {
        return toParagraph(state, dispatch, view);
    }
    return false;
};
//# sourceMappingURL=commands.js.map
