[FR] Support inserting caption in image block
Description
- Support inserting caption in image block
For example,
Impact
for the user who need to insert caption under the image block
Additional Context
No response
Hello Lucas, I would like to work on this
@LucasXu0 can you assign me issue i want to work on it
Would you like to take it @RawatDevanshu ? Otherwise, I'll assign this to @cherish2003
yes I will be working on this issue as soon as you assign.
Assigned to @RawatDevanshu
@cherish2003 , have you found any other issues that interest you?
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:-
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), ), ), ), ], ), ), );
Supported in v0.10.5