Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for tables in Tiptap editor #389

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Conversation

dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Jul 30, 2024

Problem

We need to be able to add tables within the Tiptap editor.

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
  • No - this PR is backwards compatible

Features:

  • Add table support to the Tiptap editor
    • We have an extra caption attribute that Tiptap's base table extension does not support, so it is done by extending the base extension with the additional attribute.
    • A modal was added to allow configuring this attribute.
    • The table header cell only supports paragraphs, so the base extension was also modified (previously could take block+).
  • Added icons used for table-related editing. These icons were taken from the classic CMS with the exact same functionality.
  • Also disallowed any type of marks inside headings

Screenshots

Screenshot 2024-07-30 at 11 35 05 Screenshot 2024-07-30 at 11 35 33

@dcshzj dcshzj requested a review from a team as a code owner July 30, 2024 03:36
Copy link

vercel bot commented Jul 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2024 6:52am

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

apps/studio/src/assets/BxAddColLeft.tsx Outdated Show resolved Hide resolved
apps/studio/src/assets/BxAddColRight.tsx Outdated Show resolved Hide resolved
apps/studio/src/assets/BxAddRowAbove.tsx Outdated Show resolved Hide resolved
apps/studio/src/assets/index.ts Outdated Show resolved Hide resolved
@dcshzj dcshzj force-pushed the feat/add-tiptap-table branch from 6add0ec to a598a4c Compare July 31, 2024 06:42
@dcshzj dcshzj enabled auto-merge (squash) July 31, 2024 06:42
@dcshzj dcshzj merged commit 98aec1c into main Jul 31, 2024
16 checks passed
@dcshzj dcshzj deleted the feat/add-tiptap-table branch July 31, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants