2

Following the answer on load an html file into a panel, I was able to load the HTML File taking the entire Panel, but how can I use that solution to load the file in a ITEM?

I have the following file Demo.js

Ext.define('Sencha.view.Demo', {
  extend: 'Ext.Panel',
  xtype: 'democard',

  config: {
    iconCls: 'search',
    title: 'Demo',
    styleHtmlContent: true,
    scrollable: 'vertical',
    layout: {
        type: 'vbox'
    },
    items: [{
        docked: 'top',
        xtype: 'toolbar',
        title: 'Demo'
        },
        {
         xtype: 'fieldset',
         width: "100%",
         style: {float:'left'},
         items: [
             {
                xtype: 'textfield',
                name : 'name',
                label: 'Text Label'
             },{
                xtype:  'button',
                text:   'Press',
                ui:     'confirm'
             },{
                width: '60px'
             }]
        },
        {
          > HERE I WANT TO INSERT THE HTML FILE <
        }
    ]
  }
});

I tried adding the following code in the marked area :

extend: 'HTMLPanel',

config: {
    iconCls: 'home',
    title: 'Holcim',
    styleHtmlContent: true,
    scrollable: 'vertical',
    url: 'file.html',
}

But the 'file.html' will not show. How could I achieve this? I would like to include some HTML Files in some items.


Solved

Ok, going to use another another solution hope it helps. With this solution, I just have to write " html: loadURL('url') "

Cœur
  • 37,241
  • 25
  • 195
  • 267
igama
  • 58
  • 1
  • 8

0 Answers0