react-email-editor icon indicating copy to clipboard operation
react-email-editor copied to clipboard

How to set dynamic url merge tags into Image element from tool?

Open NuttaponTamburanavit opened this issue 5 years ago • 5 comments

Do you have example to set dynamic merge tags with image src?

I would like to set look like below example

setMergeTags({
  Image_logo: {
    name: "Logo",
    value: "{{Image_logo}}"
  }
})

// HTML
< Image src="{{Image_logo}}" />

I try setMergeTags after onLoad but it's not work, please help me

Regards

NuttaponTamburanavit avatar Oct 05 '20 04:10 NuttaponTamburanavit

@NuttaponTamburanavit you can add {{image_logo}} in image url, but the merge tag dropdown only comes in Text and Button tools.

adeelraza avatar Oct 05 '20 12:10 adeelraza

@adeelraza Thanks for reply. I try follow this https://stackblitz.com/edit/react-email-editor-tut?file=components%2Feditor%2Findex.js

but it's not work (T^T).. What i miss? please help me

NuttaponTamburanavit avatar Oct 08 '20 06:10 NuttaponTamburanavit

@adeelraza Merge tags do not work in HTML when set using setMergeTags

w1am avatar Apr 27 '23 04:04 w1am

@w1am have you tried loading the preview to see?

adeelraza avatar Apr 28 '23 21:04 adeelraza

@adeelraza I didn't know there was a preview button until you mentioned it. However, is there a way to display it within the email builder itself, rather than only when clicking on 'preview'? It seems to work in the Text and Heading tools after you hit enter.

w1am avatar Apr 29 '23 03:04 w1am