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

Smart Merge Tag Issues

Open DigitalFlow opened this issue 3 years ago • 2 comments

Hi everyone,

We embed the unlayer editor in our dynamics environments.

In our environments we have merge tags that have a value like ${{ Value ("ticketnumber") }}. When someone selected a merge tag in the past, it was just inserted with its value into the template editor text.

With the last release our whole process broke, as smartMergeTags seem to have a similar syntax to our own and they just get truncated. To counter this issue, we disabled smartTags, but now we get different errors:

This content has crashed. Tool type: text. SyntaxError: Backreference to undefined group ${{Value("regardingobjectid.casetitle")}

image

Is there anything we can disable to get rid of these backreference errors? I don't understand what this backreference thing even is, didn't find anything in the documentation. All our systems (dev / prod) are showing this behavior, so effectively it is not possible to work with mergetags at all right now.

There's also some existing templates in our system that fail to be loaded properly with the latest version. One of our templates for example has a subscribe button:

{
		"type": "text",
		"values": {
			"containerPadding": "20px",
			"_meta": {
				"htmlID": "u_content_text_9",
				"htmlClassNames": "u_content_text"
			},
			"selectable": true,
			"draggable": true,
			"deletable": true,
			"color": "#000",
			"textAlign": "left",
			"lineHeight": "120%",
			"linkStyle": {
				"inherit": true,
				"linkColor": "#0000ee",
				"linkHoverColor": "#0000ee",
				"linkUnderline": true,
				"linkHoverUnderline": true
			},
			"text": "<div style=\"font-family: arial, helvetica, sans-serif;\"><span style=\"font-size: 12px; color: #999999; line-height: 14.4px;\">You received this email because you signed up for ORBIS AG.{{first_name}}</span></div>\n<div style=\"font-family: arial, helvetica, sans-serif;\">${{Value(\"regardingobjectid.casetitle\")}}${{Value(\"from.fullname\")}}${{Value(\"regardingobjectid.title\")}}</div>\n<div style=\"font-family: arial, helvetica, sans-serif;\">&nbsp;</div>\n<div style=\"font-family: arial, helvetica, sans-serif;\">&nbsp;</div>\n<div style=\"font-family: arial, helvetica, sans-serif;\">&nbsp;</div>\n<div style=\"font-family: arial, helvetica, sans-serif;\"><span style=\"font-size: 12px; color: #999999; line-height: 14.4px;\">Unsubscribe</span></div>"
}

Our custom expressions as button text also seem to crash the text content: image

We would be super glad to get some help here.

Kind regards, Florian

DigitalFlow avatar Nov 21 '22 12:11 DigitalFlow

@DigitalFlow we are working on a fix for this. It should be released soon.

adeelraza avatar Nov 29 '22 22:11 adeelraza

@DigitalFlow could you share how exactly did you disable smartMergeTags? I am looking for a way to do that but no luck.

agnieszkaac avatar Feb 22 '23 10:02 agnieszkaac