A block without fields does not show the content in Gutenberg

Support MB Blocks A block without fields does not show the content in GutenbergResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30403
    closemarketingclosemarketing
    Participant

    Hello,
    If I create a block without fields, it shows in editor:
    Enter content in the block settings on the right side.

    We have a lot of blocks that does not need any field, so it should show the content of the block.
    How could avoid that message?

    #30407
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The extension MB Blocks only support rendering the block if it has at least one custom field. I will inform the development team to consider supporting this case.

    #30629
    closemarketingclosemarketing
    Participant

    Ok! Thanks!

    #32358
    Jean-Michel JunodJean-Michel Junod
    Participant

    Same issue here. It would be nice to be able to create "empty" blocs that are only rendered in front.
    Ideally there would be a 'render_html' parameter to display any html in Gutenberg editor as preview.

    #32543
    JackkyJackky
    Participant

    +1.
    My temporary solution is to use fake field with type "hidden", like this

    [
        'id'   => 'preview_hack',
        'type' => 'hidden',
        'std'  => '1',
    ]
    #38309
    Cereal ConceptCereal Concept
    Participant

    Hi,

    Is this considered ? I think there is a real value in supporting this.
    For example when you want to use innerblocks inside a custom wrapper.

    The hidden field hack does not work for me, is there any other parameters to add ?
    Thanks

    Johann

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.