• Resolved Matze Pabst

    (@matthiaspabst)


    Is it possible to prevent a block from rendering the HTML output in the block editor?

    I created a block that creates an accordion using Bootstrap 4 collapses. It works great in the frontend but in the editor it looks aweful because I don’t load all the Bootstrap stuff in the editor. So I would prefer to keep the input mode of the BlockLab block instead of the HTML output.

    Best regards
    Matthias

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @matthiaspabst,
    Thanks for using Block Lab and for asking about HTML output.

    Is it possible to prevent a block from rendering the HTML output in the block editor?

    Is this what you had in mind? The front-end preview of the block in the block editor, not the actual fields like the image field, etc…

    https://cldup.com/5bqEYqCKGu.png

    If that is what you had in mind, there’s unfortunately no way to hide that.

    • This reply was modified 4 years, 10 months ago by Ryan Kienstra.
    • This reply was modified 4 years, 10 months ago by Ryan Kienstra.
    Thread Starter Matze Pabst

    (@matthiaspabst)

    Hi @ryankienstra

    yes, I’m talking about the frontend-preview in the block editor. See these screenshots (1. input mode, 2. preview, 3. frontend): https://cloudup.com/cMszfqeo0zw

    The preview (2nd image) looks very confusing, especially for non-tech editors. That’s why I was looking for a way to hide the preview in the editor …

    PS: The buttons load some more content in a modal via shortcodes.

    • This reply was modified 4 years, 10 months ago by Matze Pabst.
    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi Matthias,
    Thanks for your screenshots, really nice gallery in Cloudup!

    It definitely makes sense that you’d want to hide the preview.

    Unfortunately, there’s no way to do that now. But I’ll keep that in mind, it seems like it could help a lot of people.

    Maybe you’ve considered loading the CSS in the block editor so it looks good, though it’s probably a big CSS file.

    Thread Starter Matze Pabst

    (@matthiaspabst)

    Hi Ryan,

    I don’t want to overload the editor and switched to another solution without BlockLab, though I really like it.

    Thank you for your help!

    Best regards
    Matthias

    Plugin Author Ryan Kienstra

    (@ryankienstra)

    Thanks, @matthiaspabst!

    If we do add a way to disable the preview, I’ll ping you here if that’s alright.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Prevent HTML output in editor’ is closed to new replies.