• Resolved tvr121

    (@tvr121)


    How to set default settings of the code block? I have multiple pages where I want to keep the same settings and be able to change the configuration of all code blocks in my site at once. Is it possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kevin Batdorf

    (@kbat82)

    I have it set up to always save the latest settings you made in the block, but there’s no global way to configure it, nor a way to apply settings across multiple blocks after the fact.

    However, I want to build a tool to mitigate that eventually. It’s just not a trivial thing to build and need time.

    Thread Starter tvr121

    (@tvr121)

    Thank you very much for the clarifications.

    Alex Ivanovs

    (@smartereveryday)

    Hey Kevin,

    Just letting you know that I would also be very interested in being able to set default settings. I’m reworking my reference site and I have over 500 pages with about 1,500 code blocks. Not being able to have default settings is a mind-numbing amount of clicks even if the settings are saved after the first block inside the current post.

    I wouldn’t mind if you put this behind you premium plan also, I’d definitely pay for it.

    Plugin Author Kevin Batdorf

    (@kbat82)

    I started working on something over the weekend actually but I just need more time for it. If you can hold out a bit longer I’ll get to it.

    But to reiterate the reasons why it’s set up this way, this block will pre-render the expensive computational stuff as you type in the editor. There is no server rendering, and no in-browser formatting. This gives the code block near zero page performance overhead. So it’s a tradeoff. I wouldn’t be able to server render it regardless since it’s using the webassembly runtime in the browser.

    Another reason is that some users use different language, theme, and setting combinations. I consider that a special feature, although I can see it not being used by a majority.

    So what I need to build is something that will identify from the database all the posts that contain the code block, and provide an interface to update them all in once, or selectively update some. It will have to use Gutenberg’s block rendering engine and reinsert the post back into the database, which also means I need to make sure edits are recoverable in case something breaks.

    It’s an exciting feature actually and I’m motivated to implement it!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to set default settings?’ is closed to new replies.