Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (1)

Powered by Vanilla. Made with Bootstrap.
insert code in posts
  • Polyphony
    Posts: 2

    I'm sure you've already thought of this, but maybe not... when trying to type a post that has something like javascript or c in it, there's no way to format it as code.  I tried using the [code][/code] tags but they didn't work, does this messagebox allow you to use formatting languages like bbcode or something? If you already know that this is missing or I just haven't been doing it right please alert me and the <code>things don't work</code>

  • Phage
    Posts: 78
    Hmm you are right i can't find such an option too. But the closet thing i could get is the "indent". Like this:

    <html>
    <head>
    <title>test</title>
    </head
    <body>
    <h1>Indent test</h1>
    </body>
    </html>
  • Sh3llc0d3
    Posts: 1,910
    While that is one solution it's a poor one, It's not showing indentation in the code and also while it displays > and < other solutions have issue with code like "#include <iostream>" I've had to actually use html special chars/entities to get that to print otherwise it fails due to input sanitisation. Pre may be another option for the html fans but unfortunately without an addon for the forum software you won't have a full-featured code highlighter. Also, code box tags do work to an extent.

    For Xin: GeSHi Syntax Highlighter 0.2 - http://vanillaforums.org/addon/geshisyntaxhighlighter-plugin
    Obviously as it says unless you want to do a code review yourself your taking the risk but it wouldn't take too long to do some Static Code Analysis.

    Just my 2c.
  • Phage
    Posts: 78


    Well i haven't said it was he best solution and i will defenitly go for yours, but it is the best option at the moment.


  • Xin
    Posts: 3,251
    Yeah we are going to install a code highlighting plugin, but we are having issues with the editor at the moment, you may have noticed the buttons have disappeared that let you format your posts. Thanks for the suggestion


    Xin