Support

Account

Home Forums Gutenberg Gutenberg in the WYSIWYG Reply To: Gutenberg in the WYSIWYG

  • Yes, acf_register_block_type() Adding inner blocks

    To add support for inner blocks, use the <InnerBlocks /> Component within your render template/callback to define an editable area. This special element will be displayed as a native “block inserter area” when editing content, and the saved “inner blocks content” when viewing content.

    // Register a restricted block.
    acf_register_block_type(array(
        'name'              => 'restricted',
        'title'             => 'Restricted',
        'description'       => 'A restricted content block.',
        'category'          => 'formatting',
        'mode'              => 'preview',
        'supports'          => array(
            'jsx' => true
        )
    ));