HiLiteMe.com updated

September 9th, 2006. Tagged: PEAR, phpBB

Following from here, I'm proud to announce an update to HiLiteMe.com. With two custom renderers for Text_Highlighter, the service now offers you:
- BB code for your source, so you can post beautiful code to bulletin boards and others that use BB code for formatting
- simple HTML code - the formatting is using only the tags b, i and u, this is for devices such as iPod that can understand only tiny amount of HTML code. So you highlight some code and take it on the road, sweet.

In addition to that there is Simple HTML preview, CSS styles that are used for the "rich" HTML highlighting and also the code for the rich HTML formatting, so no need to view->source->copy

Other additions - tabsize setting (how many spaces for a tab, if you paste code with tabs in it) and line numbers setting (yes/no) to specify whether you want lines to be numbered in your code.

Test drive?

Note on the BB code highlighting - I tested on:
- vBulletin - works beautifully and
- phpBB - the current out-of-the-box version will not work, becuase it's not allowing [color] BB tags inside [code] tags. Buuut, there is a MOD to enable this

Tell your friends about this post: Facebook, Twitter, Google+

12 Responses

  1. PHPied.com: HiLiteMe.com updated…

  2. [...] Just finished and eager to share – I added a new syntax definition to the Text_Highlighter PEAR package (see also here). It’s for highlighting code written in the SAP’s own ABAP programming language. [...]

  3. Can ya give me the source code of thiz thourgh email hlong290494 [at] yahoo.com ?

  4. Hey dude you jneed to have visual basic!!!!!!!! how can you leave that out?! and c#?

  5. Hi Anon,

    This is using the PEAR package Text_Highlighter, it’s open source so I hope someone will contribute definition files for more languages.

  6. Hey Stoyan,
    I like what you have done here – especially including ABAP!
    Kind regards,
    Nigel

  7. I found a bug…
    your text_highlighter won’t work well with the code below: (lang = cpp)
    the hex numbers will be divided into two parts: 0 and x7fffffff

    /***********************************************************************
    Author: WHU_GCC
    Created Time: 2008-1-23 19:34:33
    File Name: 1444.cpp
    Description:
    ***********************************************************************/
    #include
    using namespace std;

    #define out(x) (cout

  8. I found a bug…
    your text_highlighter won’t work well with the code below: (lang = cpp)
    the hex numbers will be divided into two parts: 0 and x7fffffff

    /***********************************************************************
    Author: WHU_GCC
    Created Time: 2008-1-23 19:34:33
    File Name: 1444.cpp
    Description:
    ***********************************************************************/
    #include
    using namespace std;

    typedef long long int64;
    const int maxint = 0x7fffffff;
    const int64 maxint64 = 0x7FFFFFFFFFFFFFFFLL;

  9. [...] Text_Highlighter is one of my favourite PEAR packages, seems like I’m addicted to highlighting source code. After adding BB code and simple HTML renderers and an ABAP code syntax definition, today I played with adding a JSON renderer. Useful in case you want to get highlighted source code in your new shiny AJAX app. [...]

  10. Nice… you should however use htmlspecialchars() when displaying result in textarea, because if I use in code, than… we all know what will happen.

  11. Very true, Boštjan, thanks! :)

  12. Awesome!!! I just used it to help me create code documentation using Evernote.

Leave a Reply