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

Custom Blocks not importable #224

Open
omelhoro opened this issue Dec 16, 2021 · 0 comments
Open

Custom Blocks not importable #224

omelhoro opened this issue Dec 16, 2021 · 0 comments

Comments

@omelhoro
Copy link

omelhoro commented Dec 16, 2021

Hi all, I'm trying to follow the instruction of integrating customer blocks into the editor, but it throws always some error. I setup the editor following https://docs.unlayer.com/docs/getting-started and also set a user id. The save button appears for rows and when I click it, there is a request to backend to save it (status 200, "success": true). Now when I reload the site the custom block doesn't appear again.

Also when I tried to manually add the content (the data prop) of the POST /blocks request into the blocks property it throws an error:

Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')

and it points to this code:

return null == o || o.rows.forEach((function(t) {
                    var r = e.rows[t]
                      , n = [];
                    r.columns.forEach((function(t) {

where it can't iterate over r.columns because r is undefined.

I created also a custom block in the unlayer UI but that also doesn't seem to appear in the editor when I set my project id.

So how you guys make the custom blocks work?

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

1 participant