Hi ttllyy,
To post code as part of a message, you can use markdown's code block. If you specify a language after the inital ```, it'll provide syntax highlighting it as well. For example,
``` javascript
function foo() {
console.log('bar');
}
```
will show up as
Also, we actually had a community member that implemented previews for uploaded code files for our next release in May so you'll be able to use that soon.