Home Forums Gutenberg Switch to edit mode by default


Switch to edit mode by default

  • Hello.
    I can’t find any info on the net. Do you think it’s possible to switch the block to “Edit mode” by default? When it’s in “Preview mode”, if the block is empty, as it’s empty, the customer think it’s not working…

    • jnicol

    • February 25, 2019 at 2:47 pm

    You might be looking for the mode option for acf_register_block?

    It sets the block’s default display mode, either “edit” or “preview”.

    Using the supports option you can disable toggling between modes, too. So you could disable the preview mode entirely if you want.

  • Hi jnicol,
    could you please elaborate on how I would set the defualt mode to “edit” and then disable toggling between modes?
    Thank you,

  • For future reference, as I hope that this question has been resolved in the mean time:

     'mode'	=> 'edit',
     'supports' => array('mode' => false),

    When using these settings for a block, it will start in edit mode and the user won’t be able to switch.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.