Chili NEXT

Chili – The jQuery Plugin for Highlighting Code

I’ve setup a GitHub account for Chili, so that anyone interested in forging the NEXT version can easily join and contribute.

I’m still new to git, but I hope I have prepared a usable setup for development.

What follows is version 2.2 content. It’s a bit outdated, but still useful. (to be updated)

Main links

Features

  • Very fast highlighting, trivial setup, fully customizable, thoroughly documented, and MIT licensed
  • Renders identically on IE, Firefox, Mozilla, Opera, and Safari
  • Comes bundled with recipes for C++, C#, CSS, Delphi, Java, JavaScript, LotusScript, MySQL, PHP, and XHTML
  • Many configuration options: Static, Dynamic, Automatic, Manual, Ad-Hoc, with Metaobjects.
  • Provides fine control over which elements get highlighted by means of a jQuery selector or the mithical jQuery chainability.
  • Fully supports javascript regular expressions, including backreferences
  • The replacement format gives full control on what HTML is used for highlighting
  • Provides examples which show setups and features

Reviews

Integrations

28 comments on “Chili NEXT
  1. Andrea Ercolino says:

    @Jessica I’m surprised to see that IE6 is different now.

    When I developed Chili, it was just the same in all browsers, and I was quite proud of it, due to the many issues that I had to tackle to get there.

    Maybe there is something in the new jQuery that works differently, or I messed up Chili during the last rewrite.

    Unfortunately I no longer have IE6 installed in any PC I can think of now (home, work, friends) so it’ll be very difficult to track down the culprit for me.

  2. Fred van der Windt says:

    Just installed the 3.0-alpha version on an intranetsite and wrote two rudimentary recipes to highlight COBOL and JCL. The plugin works great and is much ‘lighter’ than the other available highlighter plugins (especially the one using Geshi). My compliments. Looking forward to the official release (and documentation) of v3.0.

  3. Jessica says:

    “Renders identically on IE, Firefox, Mozilla, Opera, and Safari”

    I’m seeing very different results in IE6 and Firefox.
    IE6: http://tinypic.com/r/315ixw8/4
    Fx: http://tinypic.com/r/2r4r05j/4

  4. 123doing says:

    It’s very good.
    I like this.
    Thanks for share.
    And I wrote something to introduce this project for my readers.
    You can find the post about this in my website.
    If something is wrong,pls figure it out.thanks.

  5. Craig says:

    I have just integrated this into a project and it is awesome.

  6. Kiswono Prayogo says:

    hi, thanks for creating this fastest highlighting plugin for jquery, i\’m using chilli 2.2.
    here\’s the content of my body

    var test = {}; for(var x=0;x3) test[x] = x;

    ChiliBook.recipeFolder = "SOMEWHERE/";


    ChiliBook.automatic = false;
    $( function() {
    $( \'#highlight\' )
    .one( \'click\', function() {
    var time1 = new Date();
    var $chili = $( \'#jq\' ).chili();
    var time2 = new Date();
    var delta = time2 - time1;
    var spans = $chili.find( \'span\' ).length;
    var rate = Math.round( spans / delta * 100 ) / 100;
    $( \'#highlight\' ).html(
    \'highlight done in \' + delta + \' milliseconds\'
    + \' with \' + spans + \' spans\'
    + \' at a rate of \' + rate * 1000 + \' span/sec\'
    );
    } )
    .show()
    ;
    } );

    and here\’s the content of my javascript script:
    $(function() {
    ChiliBook.recipeFolder = \”/r/js/jqc/\”;
    ChiliBook.automatic = false;
    ChiliBook.lineNumbers = true;
    $( \’#test1 > pre > code\’ ).chili();
    $( \’#test2 > pre > code\’ ).chili();
    $( \’#test3 > pre > code\’ ).chili();
    });
    the ajax of loading html.js and js.js was working just fine, but it seems that there are no syntax highlighting completed.. it still show black on white..
    i wonder was there anything wrong with it..
    please reply if you\’re not busy ^^
    Thank you in advance
    Regards,
    Kiswono P
    GB

  7. ruvan says:

    where to get js class for perl

  8. Kevin Bayes says:

    I have made an xml syntax highlighter for chili. Does the job for what I need and I am happy to share it. You can find it at http://blog.bayestech.com/post/jQuery-Chili-xml-support-plugin.aspx
    Just let me know if there are any other features of xml you would like support for.

84 Pings/Trackbacks for "Chili NEXT"
  1. [...] preview pager jQuery Plugin shortKeys jQuery Plugin jQuery Biggerlink jQuery Ajax Link Checker Chili jQuery code highlighter plugin [...]

  2. [...] Chili jQuery code highlighter plugin. [...]

  3. [...] preview pager jQuery Plugin shortKeys jQuery Plugin jQuery Biggerlink jQuery Ajax Link Checker Chili jQuery code highlighter plugin [...]

  4. [...] preview pager jQuery Plugin shortKeys jQuery Plugin jQuery Biggerlink jQuery Ajax Link Checker Chili jQuery code highlighter plugin [...]

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>