Reset current frame view
You can get the canvas inner window in this way editor.Canvas.getWindow()
Read full answer below ↓Question
Version: 0.16.12
Are you able to reproduce the bug from the demo?
[ ] Yes [x ] No
What is the expected behavior? Reset window content of current frame view
Describe the bug detailed I want to implement a component to help user do certain action by attaching event to widow (ex: scroll or resize event) or add some data to window (ex: window.pageConfig = "abc")
This component is used in different pages. But each time user switches between pages, more and more handlers get attached or component use old data from the previous page. I try to use [clear-canvas] command but it only clear dom-elements and css-rules. I try to add a new frame view to replace the current frame view, but I know sure how to do that correctly.
Could you please help to give some advice ? Thanks
Answers (1)
You can get the canvas inner window in this way editor.Canvas.getWindow()
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3731
Text element not able to be selected twice after extended with events
Version: 0.17.25 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? Update a existing component o...
Issue #3310
Tablet and mobile view not resizing
Version: The one in the demo Are you able to reproduce the bug from the demo? [X] Yes [ ] No What is the expected behavior? Mobile and tabl...
Issue #3457
Custom trait input not working
Hi @artf ! Version: 0.17.3 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? The input is create...
Issue #3573
Duplicate controls for every component
Version: 0.17.17 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? It shouldn't show duplicate c...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.