I created a paragraph named flight-search-info-block with two fields:
field_teaser_text. Then I created a custom block, where that paragraph was added as an entity reference field. Now I want the structure as
<div class="item-wrap"> <div class="item-img">...field_svg_img....</div> <div class="item-text">...field_teaser_text....</div> <div>
I want to do this using
hook_preprocess_paragraph. With this hook I was able to add the class to the paragraph wrapper div (yellow marked in the attached image). I also tried
hook_preprocess_field, but again the class was added to the paragraph.
So how can I add the classes to the red marked elements?