Roo/doc/Example.js
authorAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2016 06:44:54 +0000 (14:44 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2016 06:44:54 +0000 (14:44 +0800)
Roo/doc/Example.js

index 3bcff16..0a980bc 100644 (file)
@@ -33,6 +33,9 @@ Roo.extend(Roo.doc.Example, Roo.bootstrap.Component,  {
         
         // no colour highlighting in here....
         
+        var code = hljs ? hljs.highlight(this.code, this.lang) : String.format('{0}',this.code).replace(/\n/g, '<br/>');
+        
+        
         var cfg ={
             cls : 'panel panel-info',
             cn : [
@@ -46,7 +49,7 @@ Roo.extend(Roo.doc.Example, Roo.bootstrap.Component,  {
                         {
                             tag: 'pre',
                             cls : 'lang-' + this.lang,
-                            html :  String.format('{0}',this.code).replace(/\n/g, '<br/>')
+                            html :  code
                         }
                     ]
                 }