grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

updatesrc on image change

Open kickbk opened this issue 9 years ago • 4 comments

I must be missing something, but when I change an image, the localstorage html isn't updating, however, changing the text does. So when I refresh the page after changing an image and text, the text remains, but the image not. Is there a setting I need to change to make the localstorage html update the image src?

kickbk avatar Nov 17 '17 19:11 kickbk

Thanks for the catch @kickbk, actually src was not listened. The fix will be available in the next release

artf avatar Nov 20 '17 13:11 artf

Hi @artf This is not working in the current demo (neither on my side). If you change any image and reload the page, the image goes to it's previous src.

It's not working the first time you load a template. If you add new images in the current canvas, the src listener works as expected.

I have been debugging it for some hours, but all the ideas were unsuccessful :(

jmrgz avatar Apr 29 '18 20:04 jmrgz

I had to solve this using a workaround and it seems like a good solution at the moment. I have created my own localstorage and I'm saving the template on $(window).on('unload... and loading it again on $(window).on('load'

jmrgz avatar Apr 30 '18 12:04 jmrgz

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Sep 17 '19 17:09 lock[bot]