KevinBatdorf / code-block-pro

A Gutenberg code block with syntax highlighting powered by VS Code

Home Page:https://code-block-pro.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: code folding

MartinLBarron opened this issue · comments

Wonderful plugin. Thanks for creating it. It fills a desperate need I had.

One feature I might suggest: code folding. The ability to specify a maximum height of the code block is great, but sometimes readers want to collapse a code chunk completely. The ability of the author to add a button that would collapse the block to just, say, the header, would be a welcome addition.

An example of a code folding feature implemented by a non-wordpress application can be found here: https://quarto.org/docs/output-formats/html-code.html#folding-code

Thanks for the nice words! Have you tried using a details block and adding the code block to that?

https://wordpress.org/documentation/article/details-block/

Oh, gosh, I didn't know detail-blocks were a thing. Works perfectly and solves my problem. Thanks!