docs/default.css
[roojs1] / Roo / doc / Example.js
1 /*
2  * - LGPL
3  *
4  */
5
6 /**
7  * @class Roo.doc.Example
8  * @extends Roo.bootstrap.Component
9  * Example Element class
10  * @cfg {String} lang (phpcode|programlisting) section type.
11  * @cfg {String} code
12  *
13  * 
14  * @constructor
15  * Create a new Synopsis
16  * @param {Object} config The config object
17  */
18
19 Roo.doc.Example = function(config){
20     Roo.doc.Example.superclass.constructor.call(this, config);
21 };
22
23 Roo.extend(Roo.doc.Example, Roo.bootstrap.Component,  {
24     
25     
26     lang:   'php',
27     code : '',
28     
29     getAutoCreate : function(){
30         
31         // no colour highlighting in here....
32         
33         var cfg ={
34             
35             cls : this.lang,
36             
37             cn : [
38                 {
39                     tag: 'code',
40                     html :  String.format('{0}',this.code).replace(/\n/g, '<br/>')
41                 }
42             ]
43         };
44         
45         
46         return cfg;
47     }
48   
49     
50     
51    
52 });
53
54  
55
56