Syntax Highlighting

Discussion in 'Announcements, Suggestions and Feedback' started by Ian, Jun 1, 2017.

  1. Ian

    Ian Administrator

    Joined:
    Nov 13, 2005
    Messages:
    31
    Likes Received:
    7
    We've got a GeSHi syntax highlighter enabled for our code tags - to use it, just wrap your code in tags with an option for the language.

    Here are some examples (just remove the spaces from the brackets when using it for real):

    [ code=php ] CODE [ /code ]

    Code (PHP):
    echo "hello world";
    [ code=javascript ] CODE [ /code ]

    Code (Javascript):
    alert( 'Hello, world!' );
     
    Ian, Jun 1, 2017
    #1
    1. Advertisements

  2. Ian

    Ian Administrator

    Joined:
    Nov 13, 2005
    Messages:
    31
    Likes Received:
    7
    I've also added a few options to the insert > code menu on the editor toolbar :).
     
    Ian, Jun 1, 2017
    #2
    1. Advertisements

  3. Ian

    John Joe

    Joined:
    Apr 25, 2017
    Messages:
    87
    Likes Received:
    14
    Location:
    Malaysia
    Nice post one !
     
    Last edited: Jun 5, 2017
    John Joe, Jun 5, 2017
    #3
    Ian likes this.
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.