examples/bootstrap/Editor.js
[roojs1] / examples / bootstrap / Editor.js
index 57ca091..62e0b2e 100644 (file)
@@ -6,23 +6,16 @@ Roo.example.Editor = new Roo.XComponent({
     part     :  ["layout","viewpanel"],
     order    : '001-viewpanel',
     region   : '',
-    parent   : '#bootstrap',
+    parent   : false,
     name     : "unnamed module",
     disabled : false, 
     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';
-        
+         
         return {
             xtype: 'Body',
             xns: Roo.bootstrap,
@@ -52,37 +45,24 @@ Roo.example.Editor = new Roo.XComponent({
                                         {
                                             xtype : 'Panel',
                                             xns : Roo.bootstrap.editor,
+                                            name : 'thanks-email',
                                             width : 1000,
-                                            height : 1000,
-                                            name : 'email-inline-editor',
+                                            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');
+                                                css.push('../css-bootstrap/bootstrap.css');
+                                                css.push('../css-bootstrap/font-awesome.css');
+                                                //css.push(rootURL + '/Campaign/editor/editor.css');
                                                 
                                                 return css;
                                             })(),
-                                            items : [
+                                            listeners : {
+                                                render : function (_self)
                                                 {
-                                                    xtype : 'TextBlock',
-                                                    xns : Roo.bootstrap.editor,
-                                                    height : 300,
-                                                    listeners : {
-                                                        render : function (_self)
-                                                        {
-                                                            this.setValue('<b>test</b>');
-                                                        }
-                                                    }
-                                                },
-                                                {
-                                                    xtype : 'ImageBlock',
-                                                    xns : Roo.bootstrap.editor,
-                                                    height : 300,
-                                                    style : 'margin-top:20px;'
+                                                    _this.previewPanel = _self;
                                                 }
-                                            ]
+                                            }
                                         }
                                         
                                     ]