import type { Editor } from '@tiptap/core' import { getEditorElement } from '@admin/utils/editor/get-editor-element' import { TABLE_PART_PREVIEW_CLASS } from '@admin/utils/editor/table-part-preview-class' export function clearTablePartPreview(editor: Editor | null) { getEditorElement(editor) ?.querySelectorAll(`.${TABLE_PART_PREVIEW_CLASS}`) .forEach((cell) => { cell.classList.remove(TABLE_PART_PREVIEW_CLASS) }) }