Command event that is triggered when we click "Hide Preview"
Question
Hi, editor.on('run:preview', () => { console.log('preview ON') }) This is working fine.
Now I need the command event that is triggered when we click "Hide Preview".
Answers (3)
stop:preview
`editor.on('run:preview', () => { console.log('preview ON') })
editor.on('stop:preview', () => {
console.log('preview OFF')
})`
i tried this but the stop:preview event didn't fire
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1386
Is there any "Resize event" for components?
I want to read the resize event when an element is triggered for resizing. My current Code looks like this, editor.on("component:resize", f...
Issue #905
[Question] need to find nessesary event.
Hello to all! When dragging block into canvas, and drop it: ... we have an event to detect, what block we drop in. ?: but when i drop block...
Issue #924
[Bug]: calling 'preview' command not working correctly
This is a piece of code that i am an using: this.editor = grapesjs.init(this.config) const commandManager = this.editor.Commands commandMan...
Issue #1720
[QUESTION] How to add the button in custom traits
Hi, I try to add a button to my custom traits for my custom blocks but its not working fine as expected and also need to know how to call t...
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 →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.