Skip to content

feat: make images uploaded into table cell adjust to width of cell#2317

Open
johanneswilm wants to merge 1 commit intosuperdoc-dev:mainfrom
johanneswilm:sd-1156-images-should-resize-to-cell-size-when-inserted-if-image
Open

feat: make images uploaded into table cell adjust to width of cell#2317
johanneswilm wants to merge 1 commit intosuperdoc-dev:mainfrom
johanneswilm:sd-1156-images-should-resize-to-cell-size-when-inserted-if-image

Conversation

@johanneswilm
Copy link
Contributor

@johanneswilm johanneswilm commented Mar 6, 2026

  • Added check within getMaxContentSize() whether cursor is positioned within table cell or table header cell, and if so, attempts to return the widths of these with a fallback to the page width.
  • Added relevant tests.

@johanneswilm
Copy link
Contributor Author

Tables and table cells are an extension to the main editor, and this adds code that references table cells right in the main Editor. However, I see that table cellNodes are referenced numerous other places within the core folder, and the way it way this extra reference works is that it will still work even if the editor is run with the table extension deactivated as it checks by node name.

@johanneswilm
Copy link
Contributor Author

@harbournick @caio-pizzol This is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant