Contentful logo

Contentful Community

How to put image next to image or text next to image in rich content editor

Hello everyone,

I’m developing a website for a client, I have integrated the contentful delivery api to fetch blog entries but the client would like to know how to embed images next to other images or make them appear surrounded by text. I took a look to the rich content editor and this feature is absent or, at least, I don’t know how to do it. Anyone knows how I can achieve this?

Thanks in advance.

Hi @Carlos,

You are correct, the feature as your customer intended is at the moment absent. A suggestion could be to have embedded/linked images inside your rich text and then use a fixed layout to display them either left or right alternatively.

Hey, @carlos :wave:

Extending rich text fields to allow for more UI options wasn’t clear for me either; I ran into the same question recently.

One solution I found helpful was building components to encapsulate UI styles, like the side-by-side images or images aligned with text. You can then reference these components in your blog rich text field, and your front-end code can be set up to render the UI styles mentioned.

If you want to learn how to enable other UI styles in rich text fields, feel free to check out the guide I made on this below. Happy to answer if you have any questions if you have them. :slightly_smiling_face:

-Connor

1 Like