Issue #1526✓ SolvedOpened October 18, 2018by gasserol2 reactions

How to make fullscreen command

Quick answerby electrotype2

@nativeer I had the same problem. My workaround is to call stopCommand before runCommand: Seems to work for me.

Read full answer below ↓

Question

Hi, unfortunately I do not find documentation and can't manage to get it understand from code: I know there is a built-in command 'fullscreen', but with my configuration (from tutorial) it does load only canvas in fullscreen, no panels. Here is my html code: and here my panel code: Can somebody put me on the right way? Many thanks for your precious help and best regards!

Answers (3)

👍 Most helpfulelectrotypeJanuary 1, 2020

@nativeer I had the same problem. My workaround is to call stopCommand before runCommand:

editor.stopCommand('fullscreen');
editor.runCommand('fullscreen', {  target: '#something' });

Seems to work for me.

artfOctober 19, 2018

Good point, the default Fullscreen command enables the fullscreen on the container (#gjs) but with external panels this obviosly doesn't work, and this is why you see only the canvas. I'd really appreciate a PR for a new option which would allow me to do something like this:

gabjdevMay 4, 2019

Hi @artf , Above code worked for full screen, but after I exit full screen manually, it doesn't work anymore. Could you post code to exit full screen with same button?

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.