22 Jul 2012 2:25 AM #31
I have a problem when I create a textarea on the fly. For example I create two tinymce component and I try open HTML editor of second one, I got an error
TypeError: this.editor.controlManager.get(me.control.getInputId() + "_forecolor") is undefined(TinyMCETextArea.js line 124)
For some reason is called window with HTML editor of the first one (which is not opened because of error) and I don't know how to solve it. In open function on line 114 value of me.control.getInputId() is always ID of first created component.
23 Jul 2012 1:58 AM #32
You are right. There was only one.
It's at line number 902
23 Jul 2012 2:28 AM #33
Could you make a simple test case in a test.html which illustrates the problem? I can then debug the issue and try to solve it.
I must confess I paid too little attention to the issues of dynamic binding and creation on the fly.
As quick solution, try in the line 124
if(this.editor.controlManager.get(me.control.getInputId() + '_forecolor')) this.editor.controlManager.get(me.control.getInputId() + '_forecolor').hideMenu(); if(this.editor.controlManager.get(me.control.getInputId() + '_backcolor')) this.editor.controlManager.get(me.control.getInputId() + '_backcolor').hideMenu();
23 Jul 2012 2:32 AM #34
thanks. Earlier, I used JSLint to find out such commas, but now, it reports me tons of "errors" which are not really errors, the code is OK for all browsers.
Such commas are now tolerated by all browsers, even the IE9 (IE8 and earlier not). It i hard now to find out them
24 Jul 2012 2:20 AM #35
Thanks, looks like it works.
But I found another bug. I have tinyMCE editor in formpanel. When I update HTML code by HTML editor, I can see the changes, but when I try to save it by formpanel.getValues() function, I get content before this changes. I have to update HTML code again to get the right content.
24 Jul 2012 2:44 AM #36
This issue is covered like that (from the document to the component)
Since the text area is the master, and the TinyMCE Editor is an add-on, you have to call tinymce.triggerSave()
- before you get value with the method getValue()
- before you submit a form with that component
This call lets all TinyMCE Editor Instances save the actual contents to the underlying text area.
At the beginning of this thread, we have tried to avoid this, but it brought to some negative side effects. Thus, I let it as it is. triggerSave is recommended by the author of the TinyMCE. triggerSave is also required by another component for the ExtJS3
24 Jul 2012 3:39 AM #37
Thank you, my fault, I didn't read it.
24 Jul 2012 10:55 AM #38
- Join Date
- May 2010
- Guatemala, Central America
- Vote Rating
I just bump with your component.
Regards.UI: Sencha Architect 3.x / ExtJS 4 & 5
Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
Application Server: Glassfish / WildFly
Databases: Oracle / DB2 / MySQL / Firebird
If you like my answer please vote!
25 Jul 2012 12:16 AM #39
New version 1.8
- Fixed bugs with commas
- Fixed bugs with dynamic creation of the control
25 Jul 2012 12:21 AM #40
thank you for the acknowledgment. I am very glad that my component is useful for the people. I am a great fan of ExtJS and wanted to contribute something to the ExtJS community.
Thread Participants: 23
- firstname.lastname@example.org (3 Posts)
- murrah (10 Posts)
- ondra.cz (8 Posts)
- TonySteele (2 Posts)
- martinrame (1 Post)
- JuneEk (9 Posts)
- talha06 (2 Posts)
- richardhell (1 Post)
- maneljn (6 Posts)
- bas_tzx (2 Posts)
- Dmoney (1 Post)
- ssamayoa (5 Posts)
- scottmartin (1 Post)
- HTK (3 Posts)
- onestep (1 Post)
- SommerEngineering (5 Posts)
- yeyisxp (1 Post)
- m2276699 (1 Post)
- 123lal (3 Posts)
- Novascreen (2 Posts)
- jvisser (5 Posts)
- ssaad (1 Post)
- esscotti (1 Post)