[PR #4783] [MERGED] feat: support image block #6439

Closed
opened 2026-03-23 22:23:13 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/4783
Author: @qinluhe
Created: 2/29/2024
Status: Merged
Merged: 3/1/2024
Merged by: @qinluhe

Base: mainHead: feat/support-image-block


📝 Commits (1)

  • 9846e53 feat: support image block

📊 Changes

49 files changed (+1320 additions, -208 deletions)

View changed files

📝 frontend/appflowy_tauri/package.json (+1 -0)
📝 frontend/appflowy_tauri/pnpm-lock.yaml (+8 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/application/document/document.types.ts (+16 -0)
frontend/appflowy_tauri/src/appflowy_app/assets/image.svg (+3 -0)
frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/Colors.tsx (+7 -0)
frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/EmbedLink.tsx (+61 -0)
frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/Unsplash.tsx (+154 -0)
frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/UploadImage.tsx (+7 -0)
frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/index.ts (+4 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/_shared/popover/Popover.hooks.ts (+24 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/command/index.ts (+18 -1)
frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageActions.tsx (+163 -0)
frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageBlock.tsx (+49 -0)
frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageEmpty.tsx (+63 -0)
frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageRender.tsx (+91 -0)
frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageResizer.tsx (+54 -0)
frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/UploadPopover.tsx (+189 -0)
frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/index.ts (+1 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/math_equation/MathEquation.tsx (+11 -8)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/components/editor/Editor.tsx (+21 -17)

...and 29 more files

📄 Description

Feature Preview

https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/005cb337-c7fa-451b-a6fc-3dbb26946aa1

  • Support inserting image block

  • Supports embed link and Unsplash methods to embed images

  • Uploading cloud images is not supported (need to connect to the cloud first)

  • Support image width resizer

  • Supports image link toolbar: copy/align/delete

  • Support Escape, Tab, Enter keys


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 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/AppFlowy-IO/AppFlowy/pull/4783 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 2/29/2024 **Status:** ✅ Merged **Merged:** 3/1/2024 **Merged by:** [@qinluhe](https://github.com/qinluhe) **Base:** `main` ← **Head:** `feat/support-image-block` --- ### 📝 Commits (1) - [`9846e53`](https://github.com/AppFlowy-IO/AppFlowy/commit/9846e53b4305b89c89bd2e733fa3f00db3630917) feat: support image block ### 📊 Changes **49 files changed** (+1320 additions, -208 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/package.json` (+1 -0) 📝 `frontend/appflowy_tauri/pnpm-lock.yaml` (+8 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/application/document/document.types.ts` (+16 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/assets/image.svg` (+3 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/Colors.tsx` (+7 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/EmbedLink.tsx` (+61 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/Unsplash.tsx` (+154 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/UploadImage.tsx` (+7 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/index.ts` (+4 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/_shared/popover/Popover.hooks.ts` (+24 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/command/index.ts` (+18 -1) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageActions.tsx` (+163 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageBlock.tsx` (+49 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageEmpty.tsx` (+63 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageRender.tsx` (+91 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageResizer.tsx` (+54 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/UploadPopover.tsx` (+189 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/index.ts` (+1 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/math_equation/MathEquation.tsx` (+11 -8) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/editor/Editor.tsx` (+21 -17) _...and 29 more files_ </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/005cb337-c7fa-451b-a6fc-3dbb26946aa1 - [x] Support inserting image block - [x] Supports embed link and Unsplash methods to embed images - [ ] Uploading cloud images is not supported (need to connect to the cloud first) - [x] Support image width resizer - [x] Supports image link toolbar: copy/align/delete - [x] Support Escape, Tab, Enter keys <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:23:13 +00: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
AppFlowy-IO/AppFlowy#6439
No description provided.