table-kit

PreviousNext
Docs
platecomponent

Preview

Loading preview…
registry/components/editor/plugins/table-kit.tsx
'use client';

import {
  TableCellHeaderPlugin,
  TableCellPlugin,
  TablePlugin,
  TableRowPlugin,
} from '@platejs/table/react';

import {
  TableCellElement,
  TableCellHeaderElement,
  TableElement,
  TableRowElement,
} from '@/registry/ui/table-node';

export const TableKit = [
  TablePlugin.withComponent(TableElement),
  TableRowPlugin.withComponent(TableRowElement),
  TableCellPlugin.withComponent(TableCellElement),
  TableCellHeaderPlugin.withComponent(TableCellHeaderElement),
];

Installation

npx shadcn@latest add @plate/table-kit

Usage

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