Issue #3694πŸ’¬ AnsweredOpened Aug 11, 2021by codingmachine160 reactions

Dynamic Changes vanish when load from DB

Quick answerby GJSBlock

Thanks for reporting this, @codingmachine16. Great question about Question: Dynamic Changes vanish when load from DB. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method Most operations can be...

Read full answer below ↓

Question

@artf Here is my code , I am adding test in a div on select change init() { this.listenTo(this, "change:noOfLinks", this.getInfoLinks); }, getInfoLinks() { let canvasDoc = editor.Canvas.getDocument(); canvasDoc.getElementById("infoLinks").innerHTML = " test text "; editor.trigger("change:selectedComponent"); editor.TraitManager.getTraitsViewer().render(); }, You can see script is working fine and "test text" is displaying When I press save button. It saves in DB and when I refresh editor, it loads data but the changes "test text" is not there Please help what I am missing in the code. Thanks

Answers (1)

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @codingmachine16. Great question about Question: Dynamic Changes vanish when load from DB. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method Mo...

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.