Preview: createCell.ts
Size: 354 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/extension-table/src/utilities/createCell.ts
import { Fragment, Node as ProsemirrorNode, NodeType } from '@tiptap/pm/model'
export function createCell(
cellType: NodeType,
cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>,
): ProsemirrorNode | null | undefined {
if (cellContent) {
return cellType.createChecked(null, cellContent)
}
return cellType.createAndFill()
}
Directory Contents
Dirs: 0 × Files: 5