Issue #763Opened January 16, 2018by austinbiggs2 reactions

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)

artfJanuary 16, 20182 reactions

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, 20180 reactions

That worked perfectly!

lock[bot]September 18, 20190 reactions

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.