Skip to main content

How to add code to your posts

I added a new module last night to the site for code. So to add code to your post make sure you are using the text format Plain text and place your code between the and the code will be formatted. One thing I have found is that it does not reconginze tabs, so you will have to replace the tabs with spaces. The easiest way I have found to do this so far is paste your code in word, select the Find and Replace and in the Find What enter ^t and the replace with enter the number of spaces you want then paste the code to the forum. I am still looking around to see if there is a way to do this directly. Thanks for your patience while I work through the bugs on the site.

'code test

Sub Main
MsgBox "this should be indented"
End Sub

klmi Wed, 07/03/2019 - 04:39

Hi Brian,
I tried to use the code-tag and Text format Plain text
<code> 'some code </code>
and the code was only grey.
Then I examined the page source code and found out that your posted codes also use the tags <pre></pre>
But when I tried to do the same
<pre><code> 'some code </code></pre>
it again was only was grey.
So can you please explain what's your secret to post colored code examples?

Brian Element Fri, 07/05/2019 - 07:43

In reply to by klmi

It has been awhile since I set it up.  It could be a question of me having admin rights over the site so I can do more versus the normal user.  So the internal filters are set-up to not allow it for a normal user. The filters are there to try and keep out things like code injection and such.

The website encountered an unexpected error. Try again later.