Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert image caption to inner block #54787

Open
cbirdsong opened this issue Sep 25, 2023 · 5 comments
Open

Convert image caption to inner block #54787

cbirdsong opened this issue Sep 25, 2023 · 5 comments
Labels
[Block] Image Affects the Image Block [Type] Enhancement A suggestion for improvement.

Comments

@cbirdsong
Copy link

cbirdsong commented Sep 25, 2023

Right now, the image caption is part of the image block. It would be nice if the caption was a specialized inner block similar to list items so that it could have block styles registered on it. This might also make it easier to address #19975.

Edit: It looks like this was already tried in a PR, but that PR has no associated issue.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Image Affects the Image Block labels Sep 25, 2023
@aaronrobertshaw
Copy link
Contributor

There is a closed issue (#28920) relating to potentially converting an image block's caption to an inner block.

The possibility was also discussed on several of the PRs refactoring the Gallery block to use inner image blocks. There didn't seem to be much appetite for the change. Since then, caption element styling has been added to global styles which might reduce the potential need for the inner block as well.

Relating to the text alignment for image captions in #19975, there is also some further discussion on #12997.

@creativecoder
Copy link
Contributor

I came across this while working with a user this week--they were looking for a way to style image and video captions and couldn't find one.

@mrfoxtalbot
Copy link

mrfoxtalbot commented Jun 3, 2024

@paaljoachim
Copy link
Contributor

paaljoachim commented Aug 13, 2024

Do anyone have any thoughts on how to move this issue onward?

I believe it will be very helpful to use inner blocks for the Image caption.
The issue was originally made back in 2018 here: #12997

@simison
Copy link
Member

simison commented Sep 4, 2024

Related, if captions are inner blocks, it would be easier to add an "attribution" block as well:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants