I want to change my page.tpl so that my JS loads at the end instead of in the header. TinyMCE breaks when I try this, though everything else works fine. Is there a way around this?
I want to change my page.tpl so that my JS loads at the end instead of in the header. TinyMCE breaks when I try this, though everything else works fine. Is there a way around this?
Comments
Comment #1
twodNot that I'm aware of, but it might be possible. TinyMCE needed to run some things before the page is done loading and before it's being attached. I don't remember why or what tho, but that's at least how it was in TinyMCE 2 and we load TinyMCE 3 the same way to be sure. Have you made sure $closure is printed after the scripts normally in the header? That might do the trick but I haven't tested it.
Comment #2
wxman commentedYes, I'm afraid so, and it didn't help. I wish there was a way to tell the system to not load certain JS in the cached file; then we could load the TinyMCE JS at the top, and the rest at the end of the page.
Comment #3
sunThis normally should work, if you retain the variables order, i.e. have $scripts come before $closure.