Issue #541💬 AnsweredOpened November 17, 2017by kickbk1 reactions

Updatesrc on image change

快速解答by artf1

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

Read full answer below ↓

Question

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?

Answers (3)

artfNovember 20, 2017

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

jmrgzApril 29, 2018

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 :(

jmrgzApril 30, 2018

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'

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.