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

twod’s picture

Not 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.

wxman’s picture

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

sun’s picture

Status: Active » Fixed

This normally should work, if you retain the variables order, i.e. have $scripts come before $closure.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.