You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
While working with too much data, a longer code block can take up a large part of the hedgedoc note. To give equal attention to other parts of the note, it might be a good thing to limit the portion of the code block show to N number of lines.
This is not a limitation on the amount of content the code block (code fences) can have, it is just a constraint on the amount of code to show.
Implementor can decide how the rest of the block content is rendered.
Not sure how exactly this would be implemented, but my first instinct is to put something special in the line of the starting code fence after the language. It will need some kind of identifier and then specify a number. Probably something we should look at in the context of the other flags that are already possible with the code fences.
Anyway this feature will not be something the admin activates for all users, but something the user specifies on a per-note basis.
I think a way to opt in would make the most sense placed in the YAML header with a numerical value. Maybe a second way per block could be useful too, I'm not certain the full use case
I think we misunderstand. It's not about limiting the codeblock itself. It's about making the renderer view compact by default with a button to expand it to full height, similar to some chat clients do that in regards of code blocks.
When we add this feature, there should be an option in the renderer settings to always expand code blocks. There should be no per-document YAML configuration or similar since it is not related to the content itself, but the renderer. The codeblock syntax is bloated enough already, there shouldn't be a new option for this.
Activity
felixhummel commentedon Sep 9, 2026
Please make this opt-in. 🙏
DerMolly commentedon Sep 9, 2026
Not sure how exactly this would be implemented, but my first instinct is to put something special in the line of the starting code fence after the language. It will need some kind of identifier and then specify a number. Probably something we should look at in the context of the other flags that are already possible with the code fences.
Anyway this feature will not be something the admin activates for all users, but something the user specifies on a per-note basis.
mraof commentedon Sep 9, 2026
I think a way to opt in would make the most sense placed in the YAML header with a numerical value. Maybe a second way per block could be useful too, I'm not certain the full use case
ErikMichelson commentedon Sep 9, 2026
I think we misunderstand. It's not about limiting the codeblock itself. It's about making the renderer view compact by default with a button to expand it to full height, similar to some chat clients do that in regards of code blocks.
When we add this feature, there should be an option in the renderer settings to always expand code blocks. There should be no per-document YAML configuration or similar since it is not related to the content itself, but the renderer. The codeblock syntax is bloated enough already, there shouldn't be a new option for this.