feat: enhance table cells with rich content support (#1409)

- Support multiple content types in table cells and headers: paragraphs, headings, lists (bullet/ordered/task), blockquotes, callouts, images, videos, attachments, math blocks, toggles, and code blocks
- Add custom table extension with smart Tab key handling for list indentation within tables
- Preserve default table navigation when not in lists
This commit is contained in:
Philip Okugbe
2025-07-28 08:22:22 +01:00
committed by GitHub
parent 1f815880a4
commit 0bd7ecb9b0
6 changed files with 72 additions and 6 deletions

View File

@ -10,7 +10,6 @@ import { Highlight } from "@tiptap/extension-highlight";
import { Typography } from "@tiptap/extension-typography";
import { TextStyle } from "@tiptap/extension-text-style";
import { Color } from "@tiptap/extension-color";
import Table from "@tiptap/extension-table";
import SlashCommand from "@/features/editor/extensions/slash-command";
import { Collaboration } from "@tiptap/extension-collaboration";
import { CollaborationCursor } from "@tiptap/extension-collaboration-cursor";
@ -25,6 +24,7 @@ import {
TableCell,
TableRow,
TableHeader,
CustomTable,
TrailingNode,
TiptapImage,
Callout,
@ -160,7 +160,7 @@ export const mainExtensions = [
return ReactNodeViewRenderer(MentionView);
},
}),
Table.configure({
CustomTable.configure({
resizable: true,
lastColumnResizable: false,
allowTableNodeSelection: true,

View File

@ -10,7 +10,6 @@ import { Typography } from '@tiptap/extension-typography';
import { TextStyle } from '@tiptap/extension-text-style';
import { Color } from '@tiptap/extension-color';
import { Youtube } from '@tiptap/extension-youtube';
import Table from '@tiptap/extension-table';
import {
Callout,
Comment,
@ -24,6 +23,7 @@ import {
TableHeader,
TableCell,
TableRow,
CustomTable,
TiptapImage,
TiptapVideo,
TrailingNode,
@ -65,7 +65,7 @@ export const tiptapExtensions = [
Details,
DetailsContent,
DetailsSummary,
Table,
CustomTable,
TableCell,
TableRow,
TableHeader,