Issue #763✓ SolvedOpened January 16, 2018by austinbiggs2 reactions

Disable AssetManager while in "Preview Mode"

快速解答by artf2

Try to use events

Read full answer below ↓

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)

👍 Most helpfulartfJanuary 16, 2018

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())
austinbiggsJanuary 16, 2018

That worked perfectly!

lock[bot]September 18, 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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.