[PR #136] [MERGED] fix: image size issues #406

Closed
opened 2026-03-15 02:13:10 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/arikchakma/maily.to/pull/136
Author: @nygmaaa
Created: 2/28/2025
Status: Merged
Merged: 3/2/2025
Merged by: @arikchakma

Base: mainHead: main


📝 Commits (1)

📊 Changes

5 files changed (+32 additions, -20 deletions)

View changed files

📝 packages/core/src/editor/components/image-menu/image-bubble-menu.tsx (+4 -4)
📝 packages/core/src/editor/components/image-menu/use-image-state.tsx (+2 -2)
📝 packages/core/src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx (+6 -2)
📝 packages/core/src/editor/nodes/image/image-view.tsx (+4 -2)
📝 packages/core/src/editor/nodes/image/image.ts (+16 -10)

📄 Description

Fixed several issues related to image size:

Image

  • When copying content from one editor to another or copying rich text from elsewhere into the editor, images lose their styled size. Fixed the cause in parseHTML and renderHTML (Setting a numeric value without unit like 'px' for width/height in style is invalid, causing element.style.width to return nothing.)
  • When setting the width/height of an image block and then clearing the input value, the image size remains unchanged on that axis. Change it to auto-fit on that axis.

InlineImage

  • When setting the size, clearing the input value, the input value reverts to 20, but the image style lacks width and height. Change it to reset to the default value of 20 when the input value is cleared.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/arikchakma/maily.to/pull/136 **Author:** [@nygmaaa](https://github.com/nygmaaa) **Created:** 2/28/2025 **Status:** ✅ Merged **Merged:** 3/2/2025 **Merged by:** [@arikchakma](https://github.com/arikchakma) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`96d604a`](https://github.com/arikchakma/maily.to/commit/96d604a34821122ec167efcca6096f4ff419038f) fix: image size issues ### 📊 Changes **5 files changed** (+32 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/editor/components/image-menu/image-bubble-menu.tsx` (+4 -4) 📝 `packages/core/src/editor/components/image-menu/use-image-state.tsx` (+2 -2) 📝 `packages/core/src/editor/components/inline-image-menu/inline-image-bubble-menu.tsx` (+6 -2) 📝 `packages/core/src/editor/nodes/image/image-view.tsx` (+4 -2) 📝 `packages/core/src/editor/nodes/image/image.ts` (+16 -10) </details> ### 📄 Description Fixed several issues related to image size: **Image** * When copying content from one editor to another or copying rich text from elsewhere into the editor, images lose their styled size. Fixed the cause in `parseHTML` and `renderHTML` (Setting a numeric value without unit like 'px' for width/height in style is invalid, causing `element.style.width` to return nothing.) * When setting the width/height of an image block and then clearing the input value, the image size remains unchanged on that axis. Change it to auto-fit on that axis. **InlineImage** * When setting the size, clearing the input value, the input value reverts to 20, but the image style lacks width and height. Change it to reset to the default value of 20 when the input value is cleared. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 02:13:10 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/maily.to#406
No description provided.