support resize on bootstrap html editor
[roojs1] / examples / bootstrap / Editor.js
index ff774c0..1551846 100644 (file)
@@ -6,34 +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';
-        
-//        Roo.Ajax.request({
-//            url : baseURL + '/CampaignEdit/237',
-//            method: 'GET',
-//            params: {
-//                _editor : 1
-//            },
-//            success : function(r)
-//            {
-//                Roo.log(r);
-//            }
-//        });
-        
+         
         return {
             xtype: 'Body',
             xns: Roo.bootstrap,
@@ -52,7 +34,40 @@ Roo.example.Editor = new Roo.XComponent({
                                {
                                     xtype : 'Container',
                                     cls : 'container alpha',
-                                    xns : Roo.bootstrap
+                                    xns : Roo.bootstrap,
+                                    items : [
+                                       {
+                                            level : 4,
+                                            xtype : 'Header',
+                                            html : 'Inline Editor',
+                                            xns : Roo.bootstrap
+                                        },
+                                        {
+                                            xtype : 'HtmlEditor',
+                                            xns : Roo.bootstrap.form,
+                                            name : 'thanks-email',
+                                            width : 1000,
+                                            height : 500,
+                                                                                       resize : 'vertical',
+                                            stylesheets : (function(){
+                                                var css = [];
+                                                
+                                                css.push('../css-bootstrap/bootstrap.css');
+                                                css.push('../css-bootstrap/font-awesome.css');
+                                                //css.push(rootURL + '/Campaign/editor/editor.css');
+                                                
+                                                return css;
+                                            })(),
+                                            listeners : {
+                                                render : function (_self)
+                                                {
+                                                    _this.previewPanel = _self;
+                                                }
+                                            }
+                                        }
+                                        
+                                    ]
+
                                 }
                             ]