We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35606
    • 5 Posts
    Hi all,

    I’m having some fun trying to get $modx->regClientScript() to add in JS at the end of my pages. I’m trying to attach a snippet of JS to the manager pages to add a TinyMCE format and button, so need the code to appear after the TinyMCE files have been loaded - I can load JS fine with $modx->regClientStartupScript(), but not $modx->regClientScript().

    I’ve got my code in a plugin that’s attached to the OnManagerPageInit event, and suspect that this might be the wrong event to be using - however, I can’t see a more appropriate event to use.

    So if there’s something I’m missing (or a better way to do this with TinyMCE) I’d appreciate some help.

    Thanks!