Collapsible code snippets

XMLWordPrintable

    • 3
    • 2

      Code snippets (created with the triple back quotes) cannot be collapsed. This often interferes with readability and this was possible in Confluence a couple of years ago.

      I'd like to put in feature request for code snippets to be collapsible, in a page and inside a table in a page, and inside an expandable block.

      Even better, support additional settings on a code snippet in the editor. Currently in the editor, when click inside a code snippet the 3 operations supported are:

      • choose programming language,
      • copy the code (very handy), and
      • delete.

      In addition, it would be nice to

      • indicate a subset of lines of code to show while collapsed, this would default to "all lines". Whereas if you indicate first and last line, then while collapsed it shows only those lines; while expanded it, it shows all. This allows you to focus the code block on the most important code, while user can get more context if needed.
      • max out the number of lines to something reasonable, like 50; beyond that, scrollbar must be used
      • enable/disable line numbers

            Assignee:
            Unassigned
            Reporter:
            oschoenborn
            Votes:
            117 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated: