7 * @class Roo.doc.Example
8 * @extends Roo.bootstrap.Component
9 * Example Element class
10 * @cfg {String} title short title describing example
11 * @cfg {String} lang (php|txt|sql) code language.
12 * @cfg {String} code example code
13 * @cfg {String} output The expected output from the code
14 * @cfg {String} outputlang php|txt|sql) output language
18 * Create a new Synopsis
19 * @param {Object} config The config object
22 Roo.doc.Example = function(config){
23 Roo.doc.Example.superclass.constructor.call(this, config);
26 Roo.extend(Roo.doc.Example, Roo.bootstrap.Component, {
34 getAutoCreate : function(){
36 // no colour highlighting in here....
38 var code = hljs ? hljs.highlight(this.lang,this.code).value :
39 String.format('{0}',this.code).replace(/\n/g, '<br/>');
41 Roo.log("code=" + code);
43 cls : 'panel panel-info',
46 cls : 'panel-heading',
54 cls : 'lang-' + this.lang,
64 var out = hljs ? hljs.highlight(this.outputlang,this.output).value :
65 String.format('{0}',this.output).replace(/\n/g, '<br/>');