2013-04-01 66 views
0

我使用ExtJS的HTML編輯和如下 -ExtJS的HTML編輯工具欄被指定伸手高度

{ xtype: "htmleditor", width: 500, height: 250} 

設置的性能,同時輸入文本,達到指定高度後,在工具欄被消失後消失。 我嘗試刪除高度並設置autoHeight: true,但在這兩種情況下,HTML編輯器都不適合窗口(HTMLEditor在Ext.form.FormPanel之內)。

任何有想法解決它的人。

這是我的代碼

Ext.onReady(function() { 
    Ext.create('Ext.window.Window', { 
     title: 'This is Title', 
    resizable: false, 
    modal: true, 
    height: 300, 
    width: 500, 
    layout: 'fit', 
    closeAction: 'hide', 
     items: [ 
        new Ext.form.FormPanel({ 
        border: false, 
        autoHeight: true, 
       items: [ 
        { allowBlank: false, xtype:  
            "htmleditor", height: 250, width: 600, anchor:'100%'} 
       ] 
      }) 
     ], 
     buttons: [ 
     {text: 'Ok' }, 
     {text: 'Cancel'} 
     ] 
    }).show(); 
}); 
+0

中的jsfiddle你的代碼演示將helful –

+0

我添加的代碼爲參考。在jsfiddle中,問題無法正確再現。 –

回答

0

我已經解決了problem-新​​增layout: 'fit'到FormPanel中

Ext.onReady(function() { 
    Ext.create('Ext.window.Window', { 
     title: 'This is Title', 
    resizable: false, 
    modal: true, 
    height: 300, 
    width: 500, 
    layout: 'fit', 
    closeAction: 'hide', 
     items: [ 
        new Ext.form.FormPanel({ 
        border: false, 
        layout: 'fit', // This fixed the issue 
        items: [ 
         { allowBlank: false, 
          xtype: "htmleditor", 
          height: 250, 
          width: 600 
         } 
        ] 
      }) 
     ], 
     buttons: [ 
        {text: 'Ok' }, 
        {text: 'Cancel'} 
     ] 
    }).show(); 
});