Roo/bootstrap/Element.js
[roojs1] / Roo / bootstrap / Element.js
1 /*
2  * - LGPL
3  *
4  * element
5  * 
6  */
7
8 /**
9  * @class Roo.bootstrap.Element
10  * @extends Roo.bootstrap.Component
11  * Bootstrap Element class
12  * @cfg {String} html contents of the element
13  * @cfg {String} tag tag of the element
14  * @cfg {String} cls class of the element
15  * 
16  * @constructor
17  * Create a new Element
18  * @param {Object} config The config object
19  */
20
21 Roo.bootstrap.Element = function(config){
22     Roo.bootstrap.Element.superclass.constructor.call(this, config);
23 };
24
25 Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component,  {
26     
27     tag: 'div',
28     cls: '',
29     html: '',
30      
31     
32     getAutoCreate : function(){
33         
34         var cfg = {
35             tag: this.tag,
36             cls: this.cls,
37             html: this.html
38         }
39         
40         
41         
42         return cfg;
43     },
44     
45     getValue : function()
46     {
47         return this.el.dom.innerHTML;
48     },
49     
50     setValue : function(value)
51     {
52         this.el.dom.innerHTML = value;
53     }
54    
55 });
56
57  
58
59