-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Bug Report: Error when copy/paste template code to email editor - Failed to extract variables #5445
Comments
@lucafaggianelli you can paste template code into Custom code tab in the Email editor, it works for me |
Also, it seems like the problem occurs because when we type in the in-app editor text like this: it is represented in DOM like this:
and after copying and pasting into email editor, 'data/html' will be pasted like in the example above. But email editor is not rich text editor, so when the app tries to find variables it parses HTML tags and can't find variables. I assume it will be proper to prohibit pasting any 'data/html' into email editor not only because variables are not parsed correctly, but also because all styles and fonts are pasted with text now and there are no controls to clear them. |
Yeah I imagine it's something like that. I agree with your idea of blocking the pasting of html but on the other side it would be cool to let a user to copy the message from one editor to another, that in my opinion is a common case. So in this case the copy from the editor should copy a data/text. In any case I'm thinking about moving to the echo version where I can use react email (I already have the templates). Thanks for taking a look! |
Yes, I agree, I meant the same: prohibit paste 'data/html' but still allow to taste 'data/text'. So in case of copying from the editor 'data/text' should be pasted. |
📜 Description
When I copy/paste some template code to the email editor (typically because I created that code in other notifications channels) I receive an error when trying to save: Failed to extract variables
Indeed the custom variables are not present in variables list when clicking on the pencil icon
👟 Reproduction steps
👍 Expected behavior
It should correctly save the email content recognizing the variables
👎 Actual Behavior with Screenshots
Novu version
Novu SaaS
npm version
No response
node version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Contributing Guidelines?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: