table-base-kit

PreviousNext
Docs
platecomponent

Preview

Loading preview…
registry/components/editor/plugins/table-base-kit.tsx
import {
  BaseTableCellHeaderPlugin,
  BaseTableCellPlugin,
  BaseTablePlugin,
  BaseTableRowPlugin,
} from '@platejs/table';

import {
  TableCellElementStatic,
  TableCellHeaderElementStatic,
  TableElementStatic,
  TableRowElementStatic,
} from '@/registry/ui/table-node-static';

export const BaseTableKit = [
  BaseTablePlugin.withComponent(TableElementStatic),
  BaseTableRowPlugin.withComponent(TableRowElementStatic),
  BaseTableCellPlugin.withComponent(TableCellElementStatic),
  BaseTableCellHeaderPlugin.withComponent(TableCellHeaderElementStatic),
];

Installation

npx shadcn@latest add @plate/table-base-kit

Usage

import { TableBaseKit } from "@/components/table-base-kit"
<TableBaseKit />