📜 ⬆️ ⬇️

A couple of ideas: Habrafold and the upgrade of the tag

HTML tag Habrafold


<habrafold> collapses long sections of listings to improve article readability.
This feature has long been implemented in many editors and IDE and enjoys undoubted popularity.
I propose to do the same for Habr so that you can hide long pieces of code:

<habrafold default="collapsed" desc="     "> #include <habrahabr> ... </habrafold> int main( int argc, char* argv[] ) { .... } 

You can display it, for example, as in NetBeans.

Upgrade <source>


I propose to do:
  1. line number display button;
  2. button to copy the contents of the tag to the clipboard;
  3. and the ability to hide the entire tag as a Habrafold.
Buttons can be made visible only when hovering over the tag area, show them in the upper right corner, translucent. In this case, innovation will not spoil the existing aesthetic look.
')
And for the third item, you can add a desc attribute for the source tag, the contents of which would be shown when the tag is minimized. Also the default attribute value.

 +   

Of course, I understand that we are not on www.codeproject.com , but these changes would be very pleasant trifles.

Source: https://habr.com/ru/post/117858/


All Articles