1. #31
    Sencha User
    Join Date
    Jul 2008
    Location
    Czech republic
    Posts
    57
    Vote Rating
    1
    ondra.cz is on a distinguished road

      0  

    Default


    Hello,
    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.

  2. #32
    Sencha User
    Join Date
    Apr 2012
    Location
    Netherlands
    Posts
    25
    Vote Rating
    1
    jvisser is on a distinguished road

      0  

    Default


    You are right. There was only one.
    It's at line number 902

    Cheers!

  3. #33
    Sencha User
    Join Date
    Jun 2008
    Posts
    314
    Vote Rating
    18
    Qtx will become famous soon enough Qtx will become famous soon enough

      0  

    Default


    ondra.cz

    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

    Code:
        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();

  4. #34
    Sencha User
    Join Date
    Jun 2008
    Posts
    314
    Vote Rating
    18
    Qtx will become famous soon enough Qtx will become famous soon enough

      0  

    Default


    jvisser,

    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

  5. #35
    Sencha User
    Join Date
    Jul 2008
    Location
    Czech republic
    Posts
    57
    Vote Rating
    1
    ondra.cz is on a distinguished road

      0  

    Default


    @Qtx

    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.

  6. #36
    Sencha User
    Join Date
    Jun 2008
    Posts
    314
    Vote Rating
    18
    Qtx will become famous soon enough Qtx will become famous soon enough

      0  

    Default


    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

    http://blogs.byte-force.com/xor/tinymce/

  7. #37
    Sencha User
    Join Date
    Jul 2008
    Location
    Czech republic
    Posts
    57
    Vote Rating
    1
    ondra.cz is on a distinguished road

      0  

    Default


    @Qtx
    Thank you, my fault, I didn't read it.

  8. #38
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,329
    Vote Rating
    212
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    I just bump with your component.

    Wow!

    Impresive work!

    Congrats!

    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!

  9. #39
    Sencha User
    Join Date
    Jun 2008
    Posts
    314
    Vote Rating
    18
    Qtx will become famous soon enough Qtx will become famous soon enough

      0  

    Default


    New version 1.8
    • Fixed bugs with commas
    • Fixed bugs with dynamic creation of the control

  10. #40
    Sencha User
    Join Date
    Jun 2008
    Posts
    314
    Vote Rating
    18
    Qtx will become famous soon enough Qtx will become famous soon enough

      0  

    Default


    to ssamayoa,

    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.