Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Better Code Block for Confluence is a Macro which contains all the features you could ever want from a code macro:

  • Secure - All data and code is stored and processed on Atlassian servers so extra security risk

  • Syntax highlighting for over 300 languages, including Gherkin

  • Multiple themes to choose from to suit the page style or use different themes for different languages

  • Line highlighting to shows which bits of code are important

  • Macro can be configured to start collapsed so it does not make the document too long

  • Customizable title for each macro so you can let people know what the code is

  • Focus lines so you by default the Macro only shows a subset of lines but can be expanded

  • Configurable line numbers so you can choose to show them only when they are useful

Table of Contents
stylenone

Basic Usage

Edit a page or Create a new page and type /better click on the Better Code Block option when it appears.

...

Click on the Edit pencil icon which appears below the newly inserted macro

editpencil.pngImage Added

Options will appear to the right hand side, write or copy and paste your code into the “Code to display” field and select the language from the Language dropdown. See below for instructions on all options.

...

Syntax Highlighting

Over 300 languages are supported, see the Supported Languages section for a full list.

To choose a language, simply click on the Language dropdown and either scroll to find your language or start typing and the list will be filtered so you can then easily select your language.

Themes

Better Code Block comes with eight themes, simply select one from the dropdown, some examples are shown below

Default

We don't have a way to export this macro.

Tomorrow Night

We don't have a way to export this macro.

Line Highlighting

Auto Collapse

...