import type { Editor } from '@tiptap/core' import { getClosestTableCell } from '@admin/utils/editor/get-closest-table-cell' import { getSelectionTableCell } from '@admin/utils/editor/get-selection-table-cell' export function getEventTableCell(editor: Editor, target: EventTarget | null) { return getClosestTableCell(target) ?? getSelectionTableCell(editor) }