Suggestion: Collapsable Code in Article
-
I have suggestion: do something with the code snippet in articles so that they can be collapsed or expanded (just like posts in the forums). That way the article writer can optionally show a lot of code without getting a huge article! Maybe the person who writes the article can set a tag to 'hidden' or 'shown'. Something like this:
...blabla article
<pre state="shown" lang="vb.net">
...code and stuff that is shown at start, but can be hidden by the reader
</pre>
<pre state="hidden" lang="cs">
...code that is hidden, but can also be shown
</pre>
<pre state="alwaysshown" lang="cpp">
...code that is always shown, and can not be hidden
</pre>
more article blabla...If the snippet is hidden, you couldshow the first line of the snippet, and a button next to it with a 'Sho whole snippet' text It would be cool if you get a tooltip with the first 10 lines of the snippet, if you hover over the hidden snippet. Just fantasizing... :rolleyes: