examples/bootstrap/Editor.js
[roojs1] / examples / bootstrap / Editor.js
index ae225bd..0cc35ab 100644 (file)
@@ -12,28 +12,10 @@ Roo.example.Editor = new Roo.XComponent({
     permname : '', 
     _tree : function()
     {
-        this.parent = {
-            el : new Roo.bootstrap.Body()
-        }
-        this.parent.el.layout = false;
-        this.parent.el.render(document.body);
-        
+         
         var _this = this;
         var MODULE = this;
-        var baseURL = '/web.campaign/index.local.php';
-        
-//        Roo.Ajax.request({
-//            url : baseURL + '/CampaignEdit/237',
-//            method: 'GET',
-//            params: {
-//                _editor : 1
-//            },
-//            success : function(r)
-//            {
-//                Roo.log(r);
-//            }
-//        });
-        
+         
         return {
             xtype: 'Body',
             xns: Roo.bootstrap,
@@ -53,12 +35,37 @@ Roo.example.Editor = new Roo.XComponent({
                                     xtype : 'Container',
                                     cls : 'container alpha',
                                     xns : Roo.bootstrap,
-                                    listeners : {
-                                        render : function (_self)
+                                    items : [
+                                       {
+                                            level : 4,
+                                            xtype : 'Header',
+                                            html : 'Inline Editor',
+                                            xns : Roo.bootstrap
+                                        },
                                         {
-                                            _this.panel = _self;
+                                            xtype : 'Panel',
+                                            xns : Roo.bootstrap.editor,
+                                            name : 'thanks-email',
+                                            width : 1000,
+                                            height : 1500,
+                                            stylesheets : (function(){
+                                                var css = [];
+                                                
+                                                css.push(rootURL + '/roojs1/css-bootstrap/bootstrap.css');
+                                                css.push(rootURL + '/roojs1/css-bootstrap/font-awesome.css');
+                                                //css.push(rootURL + '/Campaign/editor/editor.css');
+                                                
+                                                return css;
+                                            })(),
+                                            listeners : {
+                                                render : function (_self)
+                                                {
+                                                    _this.previewPanel = _self;
+                                                }
+                                            }
                                         }
-                                    }
+                                        
+                                    ]
 
                                 }
                             ]