Formatting Content for Community Posts
When posting certain content to the community, you'll want to make sure it's formatted properly. For example, when posting the content of an expression, a response from an HTTP Action, or other similar code-like content, you'll want to make sure you format the content as code.
To format your content as code, you can either tap the </>
icon in the toolbar or wrap your content in backticks.
Examples
Triple Backticks
If you surround your code in triple backticks like the following:
``` "My Code" ```
The rendered post will become a code block:
"My Code"
Single Backticks
If you surround inline text in a single backtick like the following:
This is `code` inline!
The rendered post includes just the inline content formatted as code:
This is code
inline!
Custom Block Format / Language
When using the triple backticks format, the community software will automatically try to infer the type of code / language and apply the appropriate formatting. You can also explicitly type the name of a language supported by highlight.js on the first line of triple back ticks:
JSON
```json { "foo": "bar" } ```
{ "foo": "bar" }
JavaScript (expressions)
```javascript myVar = $content.event.value myVar / 20 ```
myVar = $content.event.value myVar / 20