9dde1eb9170b3688c65ad9bde455b10728fd383e
[roojs1] / examples / bootstrap / Editor.js
1
2
3 Roo.example = Roo.example || {};
4
5 Roo.example.Editor = new Roo.XComponent({
6     part     :  ["layout","viewpanel"],
7     order    : '001-viewpanel',
8     region   : '',
9     parent   : false,
10     name     : "unnamed module",
11     disabled : false, 
12     permname : '', 
13     _tree : function()
14     {
15          
16         var _this = this;
17         var MODULE = this;
18          
19         return {
20             xtype: 'Body',
21             xns: Roo.bootstrap,
22             items : [
23                  {
24                     xtype : 'Container',
25                     cls : 'content',
26                     xns : Roo.bootstrap,
27                     style : 'margin-top:100px',
28                     items : [
29                         {
30                             xtype : 'Container',
31                             cls : 'pad-wrapper',
32                             xns : Roo.bootstrap,
33                             items : [
34                                 {
35                                     xtype : 'Container',
36                                     cls : 'container alpha',
37                                     xns : Roo.bootstrap,
38                                     items : [
39                                         {
40                                             level : 4,
41                                             xtype : 'Header',
42                                             html : 'Inline Editor',
43                                             xns : Roo.bootstrap
44                                         },
45                                         {
46                                             xtype : 'HtmlEditor',
47                                             xns : Roo.bootstrap.form,
48                                             name : 'thanks-email',
49                                             width : 1000,
50                                             height : 500,
51                                                                                         resize : 'vertical',
52                                                                                         //toolbars : [ 'Standard', 'Context' ],
53                                             stylesheets : (function(){
54                                                 var css = [];
55                                                 
56                                                 css.push('../../css-bootstrap/bootstrap.css');
57                                                 css.push('../../css-bootstrap/font-awesome.css');
58                                                 //css.push(rootURL + '/Campaign/editor/editor.css');
59                                                 
60                                                 return css;
61                                             })(),
62                                             listeners : {
63                                                 render : function (_self)
64                                                 {
65                                                     _this.previewPanel = _self;
66                                                 },
67                                                 imageadd : function(a) {
68                                                     Roo.log(['imageadd', a])
69                                                 },
70                                                 imageupdate : function(a,b) {
71                                                     Roo.log(['imageupdate', a,b])
72                                                 },
73                                                 imagedelete : function(a,b) {
74                                                     Roo.log(['imagedelete', a,b])
75                                                 }
76                                             }
77                                         }
78                                         
79                                     ]
80
81                                 }
82                             ]
83
84                         }
85                     ]
86
87                 }
88             ]
89         };
90     }
91 });