Re: Javascript setHTML() won't set editor to a null value

  •  06-07-2007, 5:30 PM

    Re: Javascript setHTML() won't set editor to a null value

    This was a doozy to figure out.  I finally ripped out all my client side script and the minimal config worked.  So I started placing my script back in, one function at a time.  I had a custom button on the toolbar.  ANd I guess regardless of the configuration, you call

    CuteEditor_OnCommand

     
    The problem was that my script handles 2 different editors on the same page.  The problem wasn't the 2 editors or the 2 custom buttons, since both buttons only do some stuff and both returned true, I saved a line of code by returning true at the end of the function.  Little did I know that the function needs to return false if my commands are not handled because another button is pressed.  When I moved the return true to inside the if {} constructs for each of my button handlers, everything worked as it should have.
     
    Now I just have to go out there and put everything else I ripped or changed out back in the code!  Argh.  You may want to add that someplace in the documentation, that a custom button handler needs to return false if it doesn't handle the custom buttons.
View Complete Thread