Issue #1508šŸ’¬ AnsweredOpened October 12, 2018by ghost0 reactions

Refresh Canvas after changing gjs-html externally

Quick answerby ghost

Looks like I forgot about the DomComponents, after downloading and having a look through the src for grapesjs-newsletter, I was in the openImportCommand and noticed how the DomComponents were being updated. So I added the following into my react componentWillReceiveProps method just after I update the html in local st...

Read full answer below ↓

Question

Hi, I've been using GrapesJS with ReactJS (GrapesJS sits inside its own react component) and I'm having an issue uploading an image using my own react file-picker component. When I select an image from my filepicker react component, as its external to GrapesJS I manually update the gjs-html item in the local storage with the file path returned via the react life-cycle method componentWillReceiveProps method in my GrapesJS component which works great, the issue I'm having is that I'm unable to trigger an update of the GrapesJS canvas after I have modified the gjs-html to update the only way I...

Answers (2)

ghost• October 16, 2018

Looks like I forgot about the DomComponents, after downloading and having a look through the src for grapesjs-newsletter, I was in the openImportCommand and noticed how the DomComponents were being updated. So I added the following into my react componentWillReceiveProps method just after I update...

cederron• May 1, 2022

Looks like I forgot about the DomComponents, after downloading and having a look through the src for grapesjs-newsletter, I was in the openImportCommand and noticed how the DomComponents were being updated. So I added the following into my react componentWillReceiveProps method just after I update...

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.