PDA

View Full Version : Html formated help window



rocksportrocker
23 Jun 2009, 7:38 AM
Hi,

I'would like to open a Ext.Window which shows some HTML-formated content. I tried Ext.form.Textarea, but this does not render the HTML tags.

Any hint ?

Greetings, Uwe

aconran
23 Jun 2009, 9:06 AM
Ext.Window is a subclass of Panel and has a configuration called html.

You can use the html configuration to place raw html into the Window.



var win = new Ext.Window({
width: 200,
height: 300,
html: 'Sample html <b>here</b>'
});
win.show();


Also, take a look at the newly created configuration preventBodyReset which when enabled will ensure your Panel body's structural html is isolated from the Ext theme.

rocksportrocker
23 Jun 2009, 9:16 AM
Thanks for the answer. I knew about the html option, but
I liked the idea to have some scrollbars, such that you can show a larger helpfile.

Greetings, Uwe

rocksportrocker
24 Jun 2009, 6:53 AM
I found a solution for my problem: I embedded my text in an <iframe> which I added to the html config option of Ext.Window. That gave me the look and functionality I wanted.

Greetings, Uwe

Animal
24 Jun 2009, 9:21 AM
Seems a waste of browser resources to use an iframe.

Why can't you just load the HTML into a Window's body configuring the Window with preventBodyReset: true?

rocksportrocker
24 Jun 2009, 10:59 AM
... because I did not know about preventBodyReset. I still cant find it in the API docs.

Greetings, Uwe

tryanDLS
24 Jun 2009, 1:15 PM
http://extjs.com/deploy/ext-3.0-rc2/docs/?class=Ext.Panel&member=preventBodyReset

ljadrbln
27 Jul 2009, 1:29 PM
I'm using ExtJS 2.2.1 and have the same problem.
Does exist analogue to this option in earliest versions?

Thanks.

Animal
27 Jul 2009, 9:23 PM
No. Upgrade. There have been hundreds of fixes and enhancements since that was released.