# How to share code or flow json

**URL:** <https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506>\
**Category:** FAQs\
**Created:** [31 May 2018 14:17 UTC](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506 "2018-05-31T14:17:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [31 May 2018 14:17 UTC](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506/1 "2018-05-31T14:17:30Z")

</div>

To share code samples or flow json in this forum, you need to take care to format it properly so that it is displayed correctly.

The easiest way to do that is to click the 'Preformatted Text' button in the toolbar:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d56639561f3c9fa2f21f979311d7d4edcc5a9ef1.png)

Then paste in your code or flow json.

On standard US English keyboards, this is on the same key as the `~` character.

````auto
```
[{"id":"bbef23cc.4e7f18","type":"inject","x":100, "y": 50, "wires":[[]]}]
```

````

You can see the quotes remain untouched.

When sharing Flow JSON, add the text `flows` after the first set of back-ticks:

````auto
```flows
[{"id":"bbef23cc.4e7f18","type":"inject","x":100, "y": 50, "wires":[[]]}]
```

````

This will then get rendered as a flow:

```flows
[{"id":"bbef23cc.4e7f18","type":"inject","x":100, "y": 50, "wires":[[]]}]

```

For code from a Function node, first without the backticks:

msg.payload = "Hello There";  
return msg;

And again, with the backticks:

```auto
msg.payload = "Hello There";
return msg;

```

The added syntax highlighting also makes it much easier to read.

This should be used for _any_ code samples, such as flow JSON, JavaScript, html or XML samples.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)._
