Feature Idea (one per thread):
It's common to see in blog posts the option to add a small caption under the image that might not be the same as the alternative text. Would be great to have the option to enter a caption for images that are added within a rich text field, perhaps making use of <figcaption> so we can style it like other elements .
Issue that it solves:
Can't add and display image captions in the rich text field.
Welcome to the Prismic Forum and thanks for reaching out to us.
Currently, there is no direct property such as "figcaption" available for images in the rich-text editor. There is a workaround:
Add some text above or below of the image.
Add labels in your rich text editor. Labels will wrap the selected content in a span element with the class of the given name. You can get full information about labels here.
Then you can add whatever CSS you need for that class and put it as a caption for the particular image.
I'd suggest to use Slices to build your blog post page. Then you can have full control over image blocks. Here is a content modeling article for blog posts that includes an images slice with caption:
I hope it answers your question. Let me know if you have any other doubt.
Thanks,
Priyanka
2 Likes
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
5
Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.