PDA

View Full Version : Several HtmlEditor in single form



gricceri
30 Jul 2007, 5:02 PM
Hi all,

i create a form with 3 HtmlEditor and inspecting the code with firbug I noticed the the toolbar buttons underlying element has the same id.

This could cause problems like the following:



//Inside the createToolbar
var customBtn = btn('myCustomId', false, myCustomHandler );

//imagine an internal cusotm dialog that popup when i press on
//my customBtn
customDialog.show(customBtn.getEL());


from wich button the dialog appears if we have 3 elements with the same id ??

I solved thi issue appending to the toolbar button id the editor.id as prefix, but this needed to override some private function to make editor works right.

jack.slocum
30 Jul 2007, 8:16 PM
http://extjs.com/forum/showthread.php?t=8887

gricceri
31 Jul 2007, 12:51 AM
Hi Jack,

sorry if would not clear explaining what i found.
I attach a screenshot of firebug.
The version I tested is:
Ext 1.1 Release Candidate 1

As you can see in the screeshot, the table id of a toolbar button ( in the example the 'bold' ) will be always the same if i put more then one HtmlEditor in the same page.
That is, if I would put 3 HtmlEditor in the page, each toolbar button have the same id.

I took the screenshot using the Dynamic Form example page in the extjs documentation.

jack.slocum
31 Jul 2007, 5:53 AM
This has been corrected already in SVN and will be in RC2.

gricceri
31 Jul 2007, 10:45 AM
Many thanks.

Long life to ext ;) !