Files
outline/shared/editor/components/hooks
Claude 3b3156a174 fix: clamp in-cell images to column width while keeping resize
Replace the CSS/handle-hiding approach with a component-level clamp so
images inside table cells can still be resized, but never wider than the
cell.

The Image component measures the containing cell's usable content width
(momentarily removing the image from layout so the cell reports its true
column width rather than the width the image forces) and uses it as both
a pixel `max-width` on the rendered image and an upper bound passed to
useDragResize. Oversized/pasted images scale down to fit the column, and
dragging is capped at the cell edge. A ResizeObserver keeps the bound in
sync as the column or table is resized.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bpy5eV6C2wwf2MNut68BEh
2026-07-05 09:22:04 +00:00
..