Support » Fixing WordPress » How to insert inline javascript?

  • Hi all,
    I’m trying to insert some javascript into my posts (the posts themselves, not the templates), and hitting problems with the code being reformatted and hence breaking.

    I know that one solution is to put all the JS into a remote script and call that. But that’s kind of defeating the point of having a CMS tool to do all the file management stuff for you! And it also means I’ll have loads of JS to debug if I’m looking for something specific.

    Does anyone know a way where I can turn off the formatting between the SCRIPT and /SCRIPT tags?


Viewing 1 replies (of 1 total)
  • First of all, don’t forget that WordPress does not claim to be a CMS. It is blogging software that is slowly growing to become a CMS but it is in no way ready for CMS status.

    Okay, I have javascript in a couple of my pages, though I’m slowly removing them because they are better replaced with other things, but I have no problems with formatting between the script tags. Just don’t but the script info into the post, call it from a script link.

    You can also use TextControl plugin which allows you to force which kind of formatting, or non-formatting, on a post by post or global basis.

Viewing 1 replies (of 1 total)
  • The topic ‘How to insert inline javascript?’ is closed to new replies.