Multiple option exists depending on your needs, wants and knowledge.
- Default callouts – Like you’ve already explored a bit, but can be a bit cumbersome due to the need for quoting everything. That can be a little better by using the Command palette > Toggle blockquote command, and it’ll still give you that copy option you want.
- Admonition callouts – A plugin for callouts, which uses an outer codeblock to encompass your markdown into a callout. Clear pro for this one is that the code block is left unaltered. Clear con for this one is that renamed links do not get updated within this callout type
- details/summary html – As you’ve experienced this does solve it to some extent, but it’s rather limiting with strings/markdown/html-stuff
- CSS styling – There also in an option to apply custom CSS styling, which could allow for display of a given amount of lines, and then scroll for the rest of the code. This would allow for smaller code blocks to show in full (without expanding), whilst larger code blocks would require scrolling. It could be possible to add collapsing to the code block, as well, but I’m not sure of that one. But I do know it’s possible to limit the height of the code blocks, even though some of the CSS gurus needs to help us with the exact code to use.
- Header folding – Another option could be to add headings in front of the code block, which do allow for the section to be collapsed. But I’m not sure if possible, at least I’ve not found a way, to make these section be collapsed by default.
So there you’ve got some options to consider, and play around with.