Disable AssetManager while in "Preview Mode"
Question
After reviewing code, I'm not sure how to disable opening the AssetManager while in Preview Mode. Has anyone done this successfully?
Answers (3)
Try to use events
let prv;
editor.on('run:preview', () => prv = 1)
editor.on('stop:preview', () => prv = 0)
editor.on('run:open-assets', () => prv && editor.Modal.close())
That worked perfectly!
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.
Issue #1322
Disable editing in Preview Mode.
@artf How can we disable editing in the preview mode and re-enable it when preview mode off. I want to remove editor and hide toolbar in th...
Issue #1897
[Question] view vs code
Hello...and sorry for my english! First of all, congratulations for this fantastic framework. I'm trying to use GrapeJS to create my own wo...
Issue #1059
[Question]: Load html content from a file dynamically
Hi, I need to load content from a html file from server onto editor after or while initializing editor. How this can be implemented? HTML w...
Issue #466
Disable button
Hi, I added a new button in Options Panel and now I'm trying to make it disable while a given criteria is not ok. For now, I tried to use t...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.