feat(admin): add table support to PortableText editor#222
Conversation
🦋 Changeset detectedLatest commit: 0be5376 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
78907f8 to
7ecfe74
Compare
|
Thanks! Could you add a changeset, so this is included in the changelog and triggers a release. There's more info in |
91a8cbf to
09eb300
Compare
|
There seems to be quite a bit of extra stuff in here, beyond the main feature |
09eb300 to
96ba2e1
Compare
Overlapping PRsThis PR modifies files that are also changed by other open PRs: This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
ascorbic
left a comment
There was a problem hiding this comment.
Thanks. This is a great addition. It just needs a few changes. Can you also add unit tests for both conversion directions and ensure oyu have completed the checklist in the description.
|
|
||
| .ProseMirror td, | ||
| .ProseMirror th { | ||
| border: 1px solid #d1d5db; |
There was a problem hiding this comment.
Can we avoid using hard-coded colours. The rest of the admin UI uses Tailwind and Kumo design tokens, and these won't follow that. That applies to the other places in here too.
| "@tiptap/extension-table": "^3.22.1", | ||
| "@tiptap/extension-table-cell": "^3.22.1", | ||
| "@tiptap/extension-table-header": "^3.22.1", | ||
| "@tiptap/extension-table-row": "^3.22.1", |
There was a problem hiding this comment.
Can we use catalog dependencies here, and ensure they match the other tiptap extension versions
| : "tableCell"; | ||
|
|
||
| // Map PortableText marks to ProseMirror marks | ||
| const markNameMap: Record<string, string> = { |
There was a problem hiding this comment.
There's already a convertPTMarks function in this file that handles the PT/PM mark mapping. Please use that instead of the inline markNameMap here – it handles link markDefs too, which this version silently drops.
|
This PR has been inactive for 14 days. It will be closed automatically in 7 days if there is no further activity. If you're still working on this, please push an update or leave a comment. |
|
@tohaitrieu it would be great to get this in! It shouldn't take much to get it ready |
423aaeb to
f0fd068
Compare
f0fd068 to
20166f8
Compare
ad03e33 to
d68dc52
Compare
- Add TipTap table extensions (Table, TableRow, TableCell, TableHeader) - Add table controls to editor toolbar with slash command (/table) - Add TableBubbleMenu for editing tables (add/remove rows/columns) - Update PT↔PM converters with proper markDefs handling for links - Use Kumo design tokens for table styling (no hard-coded colors) - Add unit tests for table conversion in both directions
c1b7ad7 to
0be5376
Compare
|
@tohaitrieu you still working on this? if not ill make one. |
What does this PR do?
Adds table support to the TipTap/PortableText editor in the admin UI. Users can now insert, edit, and manage tables in content with proper toolbar controls.
Changes:
Discussion: #217
Type of change
Checklist
pnpm typecheckpassespnpm --silent lint:json | jq '.diagnostics | length'returns 0pnpm testpasses (or targeted tests for my change)pnpm formathas been run