PDA

View Full Version : htmleditor does not show



drabslab
8 Aug 2009, 9:48 AM
I have this code:

Ext.onReady (function() {

var storyform = new Ext.form.FormPanel ({
url: 'controller.php?cdrv=3',
renderTo: Ext.getBody(),
layout: 'form',
title: 'New story',
width: 450,
height: 400,

items: [{
xtype: 'textfield',


fieldLabel: 'Title',


name: 'title'


},{


xtype: 'textfield',


fieldLabel: 'Summary',


name: 'summary'


},{


xtype: 'textarea',


id: 'bulk',


fieldLabel: 'Bulk',


defaultValue: 'enter your text here',


height: 300,


anchor: '98%'


}]
});
});

It works without problem until I replace the textarea with 'htmleditor'

when I do that the area where the htmleditor should appear is blank (but the label is visible), and when I try to focus on the htmleditor then it appears like I get invisible characters appearing behind the lables and fields.

I suppose that this is a beginners error but I really can't figure out what is wrong

All help appreciated!

drabslab
8 Aug 2009, 9:51 AM
sorry for the clumsy text, i did enter some formating but it does not appear, another mystery to solve

steffenk
8 Aug 2009, 10:43 AM
use codeboxes ;)

the code works fine if you remove superfluous brackets


var storyform = new Ext.form.FormPanel ({
url: 'controller.php?cdrv=3',
renderTo: Ext.getBody(),
layout: 'form',
title: 'New story',
width: 450,
height: 400,

items: [{
xtype: 'textfield',
fieldLabel: 'Title',
name: 'title'
},{
xtype: 'textfield',
fieldLabel: 'Summary',
name: 'summary'
},{
xtype: 'htmleditor',
id: 'bulk',
fieldLabel: 'Bulk',
defaultValue: 'enter your text here',
height: 300,
anchor: '98%'

}]

});

drabslab
8 Aug 2009, 12:07 PM
Hai Steffen,

I tried your code but it does not work either.

I notice that you haev removed:

Ext.onReady (function() {

});

did you change anything else?

but without this nothing works?

drabslab
8 Aug 2009, 12:33 PM
strange,

i placed it all in a window and now it works!

I just do nto know why (:|:-?:-?

Ext.onReady (function() {

var storyform = new Ext.Window ({
url: 'controller.php?cdrv=3',
layout: 'form',
title: 'New story',
width: 450,
height: 400,

items: [{
xtype: 'textfield',
fieldLabel: 'Title',
name: 'title'
},{
xtype: 'textfield',
fieldLabel: 'Summary',
name: 'summary'
},{
xtype: 'htmleditor',
id: 'bulk',
fieldLabel: 'Bulk',
defaultValue: 'enter your text here',
height: 300,
anchor: '98%'

}]

});
storyform.show();
});