• Thank you for developing such a great plugin. I have a suggestion that it would be more convenient if users could set default values for header, footer, line number display, expand button, etc. in the plugin settings before inserting code blocks into articles, and only make minor modifications when needed.

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

    (@kbat82)

    Hey, thanks for the review. It should preserve the previous settings when you add a new block. So if you add one with PHP, then change the font, line settings, and so on (there’s a list here). Is that not happening? If not then there’s a bug somewhere and I’d need some more info. If so, but it’s not what you mean, can you describe it a bit more?

    I do want to add a way to update multiple code blocks at a time, and possibly add profiles to quickly swap settings, but it’s a bit complicated of a project so will take me some time to get there.

    I appreciate the feedback!

    Thread Starter zhu021

    (@zhu021)

    Sorry for the late reply.

    I’ve tried again. I made some custom settings, including language, header type, footer type, themes, and max height. Most of the settings can be preserved for the next time, but the ‘Enable frontend max height’ will be disabled every time when I create a new post and add a code pro block.

    This issue occurs both in my local Windows 10 environment and on my Aliyun serverless server.

    Since English is not my native language, I hope I can convey my thoughts correctly.

    • This reply was modified 1 year, 7 months ago by zhu021.
    Plugin Author Kevin Batdorf

    (@kbat82)

    I don’t preserve the “Enable frontend max height” setting because not every block would need that. I can give you some custom CSS though if you want all blocks to have a specific max height. Try this:

    div[class*='code-block-pro'] pre {
        max-height: 97px !important;
    }

    If that doesn’t work share a link and I can help out.

    Also, WordPress will eventually support pre-build synced patterns that would come with attributes set up. When they add support for that I will make it clear in the UI how to use it.

    Thread Starter zhu021

    (@zhu021)

    Thanks for your reply, Batdorf.

    The code snippet you provided works, but it doesn’t behave as I expected. I hope the <code></code> section can be initially displayed in a folded state, and can be unfolded when a visitor clicks the expand button, rather than being displayed at a fixed height all the time.

    So, it seems we’ve come back to the very beginning: I suggest that you provide users with the option to preserve the “Enable frontend max height” and other relevant settings as defaults. I believe this would be suitable for most scenarios.

    Plugin Author Kevin Batdorf

    (@kbat82)

    Maybe I can make it optionally persist. I’ll explore the idea this weekend. If not I can also update the css snippet for you so it works with the expanding too

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘suggestion’ is closed to new replies.