griffin.editor: Added support for Google Prettify

I’ve just refactored the highlighting features of griffin.editor. You can now use your favorite highlighter by implementing the $.griffinEditorExtension.highlighter callback like this:

[javascript]
$.griffinEditorExtension.highlighter = function(inlineSelector, blockSelector) {
$.each(blockSelector, funtion() {
console.log(‘Code block to highlight: ‘ + $(this).html());
};
}
[/javascript]

The default implementation looks for either highlight.js or Google Prettify.

I’ve also made a small change so that the inline code blocks aren’t highlighted per default. It makes the text more readable imho (and the programming language guessing in the highlights have too little code to guess on).

Two new jQuery plugins

I’ve created examples for two of my newer jQuery plugins:

jQuery.elementOverlay

Will put an overlay over any HTML element.

[javascript]
$(‘#css-list’).elementOverlay();
[/javascript]

Demopage: http://griffinframework.net/jQuery/overlay/

jquery.griffinTour

A tour script which can be used to show-case the features of a site.

Demopage: http://griffinframework.net/jQuery/tour/