[GH-ISSUE #3477] [FR] Support inserting caption in image block #1564

Closed
opened 2026-03-23 20:51:02 +00:00 by mirror · 8 comments
Owner

Originally created by @LucasXu0 on GitHub (Sep 20, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3477

Originally assigned to: @richardshiue on GitHub.

Description

  • Support inserting caption in image block

For example,

Screenshot 2023-09-20 at 22 28 16

Impact

for the user who need to insert caption under the image block

Additional Context

No response

Originally created by @LucasXu0 on GitHub (Sep 20, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3477 Originally assigned to: @richardshiue on GitHub. ### Description - Support inserting caption in image block For example, <img width="330" alt="Screenshot 2023-09-20 at 22 28 16" src="https://github.com/AppFlowy-IO/AppFlowy/assets/11863087/97a604e0-2334-453d-9874-db66ffd039f9"> ### Impact for the user who need to insert caption under the image block ### Additional Context _No response_
Author
Owner

@RawatDevanshu commented on GitHub (Sep 27, 2023):

Hello Lucas, I would like to work on this

<!-- gh-comment-id:1737259126 --> @RawatDevanshu commented on GitHub (Sep 27, 2023): Hello Lucas, I would like to work on this
Author
Owner

@cherish2003 commented on GitHub (Oct 3, 2023):

@LucasXu0 can you assign me issue i want to work on it

<!-- gh-comment-id:1745236351 --> @cherish2003 commented on GitHub (Oct 3, 2023): @LucasXu0 can you assign me issue i want to work on it
Author
Owner

@annieappflowy commented on GitHub (Oct 4, 2023):

Would you like to take it @RawatDevanshu ?
Otherwise, I'll assign this to @cherish2003

<!-- gh-comment-id:1746820445 --> @annieappflowy commented on GitHub (Oct 4, 2023): Would you like to take it @RawatDevanshu ? Otherwise, I'll assign this to @cherish2003
Author
Owner

@RawatDevanshu commented on GitHub (Oct 4, 2023):

yes I will be working on this issue as soon as you assign.

<!-- gh-comment-id:1746887697 --> @RawatDevanshu commented on GitHub (Oct 4, 2023): yes I will be working on this issue as soon as you assign.
Author
Owner

@annieappflowy commented on GitHub (Oct 4, 2023):

Assigned to @RawatDevanshu

<!-- gh-comment-id:1746930564 --> @annieappflowy commented on GitHub (Oct 4, 2023): Assigned to @RawatDevanshu
Author
Owner

@annieappflowy commented on GitHub (Oct 4, 2023):

@cherish2003 , have you found any other issues that interest you?

<!-- gh-comment-id:1746931303 --> @annieappflowy commented on GitHub (Oct 4, 2023): @cherish2003 , have you found any other issues that interest you?
Author
Owner

@RawatDevanshu commented on GitHub (Oct 22, 2023):

hello @LucasXu0, I have implemented the required change and it looks visually as asked but it is not functionally working can you share some insights on what can work, I have tried moving the text field widget up the tree but it's not working, after selecting text field and pressing backspace the whole image block gets deleted.

I have added gif example here:-
https://pasteboard.co/MnqpivItCKSi.gif

so basically keyboard controls are not working as usual for textfield widget

this is how it looks right now:-
image
image

Here are the changes i made to line 119 in custom_image_block_component.dart
child = BlockSelectionContainer( node: node, delegate: this, listenable: editorState.selectionNotifier, blockColor: editorState.editorStyle.selectionColor, supportTypes: const [ BlockSelectionType.block, ], child: Padding( key: imageKey, padding: padding, child: Column( children: [ child, const Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: TextField( style: TextStyle(decoration: TextDecoration.underline), decoration: InputDecoration( border: InputBorder.none, hintText: 'Caption', hintStyle: TextStyle(decoration: TextDecoration.underline), ), ), ), ], ), ), );

<!-- gh-comment-id:1774022840 --> @RawatDevanshu commented on GitHub (Oct 22, 2023): hello @LucasXu0, I have implemented the required change and it looks visually as asked but it is not functionally working can you share some insights on what can work, I have tried moving the text field widget up the tree but it's not working, after selecting text field and pressing backspace the whole image block gets deleted. I have added gif example here:- https://pasteboard.co/MnqpivItCKSi.gif so basically keyboard controls are not working as usual for textfield widget this is how it looks right now:- ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/76153868/dbc68eab-a08c-4e03-b33c-8d73cca8573e) ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/76153868/641b05a4-3bfc-4b64-a0c7-20f8b9bce653) Here are the changes i made to line 119 in custom_image_block_component.dart ` child = BlockSelectionContainer( node: node, delegate: this, listenable: editorState.selectionNotifier, blockColor: editorState.editorStyle.selectionColor, supportTypes: const [ BlockSelectionType.block, ], child: Padding( key: imageKey, padding: padding, child: Column( children: [ child, const Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: TextField( style: TextStyle(decoration: TextDecoration.underline), decoration: InputDecoration( border: InputBorder.none, hintText: 'Caption', hintStyle: TextStyle(decoration: TextDecoration.underline), ), ), ), ], ), ), ); `
Author
Owner

@annieappflowy commented on GitHub (Dec 5, 2025):

Supported in v0.10.5

<!-- gh-comment-id:3615262090 --> @annieappflowy commented on GitHub (Dec 5, 2025): Supported in v0.10.5
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#1564
No description provided.