Roo/doc/Example.js
authorAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2016 04:47:49 +0000 (12:47 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2016 04:47:49 +0000 (12:47 +0800)
Roo/doc/Example.js

index 4b18b4e..edcb597 100644 (file)
@@ -8,7 +8,8 @@
  * @extends Roo.bootstrap.Component
  * Example Element class
  * @cfg {String} lang (phpcode|programlisting) section type.
- * @cfg {String} code
+ * @cfg {String} code  example code
+ * @cfg {String} output The expected output from the code
  *
  * 
  * @constructor
@@ -25,6 +26,7 @@ Roo.extend(Roo.doc.Example, Roo.bootstrap.Component,  {
     
     lang:   'php',
     code : '',
+    output : '',
     
     getAutoCreate : function(){
         
@@ -36,11 +38,15 @@ Roo.extend(Roo.doc.Example, Roo.bootstrap.Component,  {
             
             cn : [
                 {
-                    tag: 'code',
+                    tag: 'pre',
                     html :  String.format('{0}',this.code).replace(/\n/g, '<br/>')
                 }
             ]
         };
+        if (this.output) {
+            
+        }
+        
         
        
         return cfg;