Skip to content
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

loading template in react-email-editor #392

Open
Anubhavgarg1910 opened this issue Apr 7, 2024 · 6 comments
Open

loading template in react-email-editor #392

Anubhavgarg1910 opened this issue Apr 7, 2024 · 6 comments

Comments

@Anubhavgarg1910
Copy link

Hey I am using react-email-editor in my project. It's working fine just an isssue. I am getting html Document but I want it to load in my react-editor initially . Is there any predefined function so that I can load my html to json and render it.
please help me with this looking for a solution from a long time.

@SouravBandyopadhyay
Copy link

As per documentation you can not load html directly you have to convert it into json

@Anubhavgarg1910
Copy link
Author

Anubhavgarg1910 commented Apr 25, 2024 via email

@SouravBandyopadhyay
Copy link

SouravBandyopadhyay commented Apr 25, 2024

As of now from my knowledge there is no direct way to convert html to json such that unlayer editor can read it out. You can take reference from the below issue as well:

@sarpkayature
Copy link

sarpkayature commented Apr 25, 2024

You cannot upload a JSON. Unlayer converts html its own way.

@Anubhavgarg1910
Copy link
Author

Anubhavgarg1910 commented Apr 25, 2024 via email

@sarpkayature
Copy link

sarpkayature commented Apr 25, 2024

@Anubhavgarg1910 my advice will be to keep your html and html's json in database. While loading it from remote, just load json. Html will be required during sending emails. In docs you can find very describing examples about it. They recently updated their docs. Unlayer doesn't read html you export unless audit it i think.Therefore keep you template's json and html in different keys in your db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants