Issue #1493💬 AnsweredOpened October 9, 2018by dancodes0 reactions

Render() works on the first time but not on subsequent calls

Quick answerby artf

@dancodes can you provide a live demo of the issue, please?

Read full answer below ↓

Question

Hello, I've created a custom component that shows images using background-image on a <div> instead of using an <img> element. It's mostly working, except that every time I change its src trait I must reload the editor to preview the rendered element. This is its view: On editor load, the component has its correct background-image value set. Upon changing its src trait (a text field), it loses that CSS property. What am I doing wrong?

Answers (3)

artfOctober 11, 2018

@dancodes can you provide a live demo of the issue, please?

no-response[bot]October 21, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we ne...

lock[bot]October 21, 2019

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.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.