# Wiki - how to post code on this forum

**URL:** <https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831>\
**Category:** General Discussion\
**Tags:** scripting\
**Created:** [August 14, 2023, 9:09pm UTC](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831 "2023-08-14T21:09:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 14, 2023, 9:09pm UTC](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831/1 "2023-08-14T21:09:34Z")

</div>

_This thread is intended as a short help file for all those struggling to post formatted code on the forum._

# Code block formatting

Posting formatted code on the forum (and most others) is as simple as selecting the code and pressing the \</\> button. It works the same as applying **Bold** or _Italic_ styles to your document. It preserves indentation and applies syntax highlighting.

![How to post code](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d319898ae6a97bfc4edfc8798404bc77c77fa64c.gif)

Note that all the \</\> button does is add three backticks ``` on the line _before_ the code block and another ``` on the line after. If you wish you can type these rather than use the button.

## Language-specific highlighting

Add the language name after the triple backticks, if required.

````
```sql <-- SQL syntax highlighting
```css <-- CSS syntax highlighting

````

Python/Jython is automatically highlighted and Ignition's expression language is highlighted to some extent.

* * *

# Inline code formatting

Enclose the code snippet in single backticks, `...`.  
 ![Inline code formatting](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/1/414bc9437026d0bd8f812e4e013c155e4e668460.gif)

* * *

# Collapsing code / hide details

Code can also be collapsed using the Hide Details feature. This can tidy up a thread with multiple code blocks and provides a ready-made index within the post.

![Hide details](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/a/aa2836d4aa66b734e8c705d6fa759d6546e8b802.gif)

# Editing posts to fix them

You can edit your post to fix the code formatting by clicking the icon pencil icon:  
 ![Forum edit post](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/1/4184678d689e001787f8319b6d9d6380b7a3c415.png)

(There is a separate pencil icon if you just want to fix the title / tags.)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 22, 2023, 4:22pm UTC](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831/12 "2023-10-22T16:22:49Z")

</div>



---

<div class="post-metadata">

**Author:** ![mauricio\_caceres](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@mauricio\_caceres](https://forum.inductiveautomation.com/u/mauricio_caceres)\
**Post date:** [May 21, 2025, 8:41pm UTC](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831/13 "2025-05-21T20:41:37Z")

</div>

Thanks for this very useful how-to tutorial!

---

<div class="post-metadata">

**Author:** ![media](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/media/32/86828_2.png) [@media](https://forum.inductiveautomation.com/u/media)\
**Post date:** [August 20, 2026, 8:54am UTC](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831/14 "2026-08-20T08:54:51Z")

</div>

Just a quick tip to add: if you're posting **JSON** (like Perspective view dumps), adding `json` after the backticks helps a lot with reading complex structures:

````
```json
{
  "custom": {
    "property": "value"
  }
}
```

````
