Syntax Highlighting of Code Blocks - How to Format Code on the Forum

When you are posting program code, for example using the Elm language, you can improve its readability by applying syntax highlighting.

To apply syntax highlighting, you can fence the code in the editor like this:

```Elm
type alias ShipUIModuleButton =
    { uiNode : UITreeNodeWithDisplayRegion
    , slotUINode : UITreeNodeWithDisplayRegion
    , isActive : Maybe Bool
    , isHiliteVisible : Bool
    , rampRotationMilli : Maybe Int
    }
```

Then it appears like this:

type alias ShipUIModuleButton =
    { uiNode : UITreeNodeWithDisplayRegion
    , slotUINode : UITreeNodeWithDisplayRegion
    , isActive : Maybe Bool
    , isHiliteVisible : Bool
    , rampRotationMilli : Maybe Int
    }

Another way to add syntax colorization is to link to a range of lines on GitHub:

Most of the time, linking a range of lines in a file on GitHub is better because it allows us to see more of the context.

Few features:

[link for eve online](http://eveonline.com) ==> link for eve online


![Image](https://forum.botlab.org/uploads/default/original/1X/da2619c598906a0a3ec85f91ce1c93e7da393146.png) ==>
Image


> Blockquote text ==>

Blockquote text


[details="Spoiler"]
This text will be hidden
[/details]

==>

Spoiler

This text will be hidden


More info about Markdown or see tutorial.

This is <b>bold</b>.
This is [b]bold[/b].
This is **bold**.

==>
This is bold.
This is bold.
This is bold.


For big part of code you can use https://pastebin.com/


Read more about creating posts on this forum…

1 Like