This widget encapsulates the Chili-jQuery plugin (modified version 2.2 for jQuery 1.4.2) and can be used to decorate code listings in most of popular computer languages (C++, C#, CSS, Delphi, Java, JavaScript, LotusScript, MySQL, PHP, and XHTML).
Yii 1.1.6 or above...
$html = <<<CODE <html> <head> <title>Code Sample</title> </head> <body> <b>Hello World!</b> </body> </html> CODE; $this->widget('ext.jchili.JChiliHighlighter',array( 'lang'=>"html", 'code'=>$html, 'showLineNumbers'=>false ));
$this->widget('ext.jchili.JChiliHighlighter',array( 'fileName'=>__FILE__, ));
$this->widget('ext.jchili.JChiliHighlighter',array( 'pathAlias'=>"system.base", 'fileName'=>"CComponent.php", 'firstLineNumber'=>1, ));
$this->widget('ext.jchili.JChiliHighlighter',array( 'lang'=>"html", 'fileName'=>"http://www.99lime.com/elements/", 'firstLineNumber'=>1, ));
Be the first person to leave a comment
Please login to leave your comment.