=== Allow Javascript in Posts and Pages === Contributors: Hit Reach Donate link: Tags: post, pages, javascript, filtering, text, add javascript Requires at least: 2.0 Tested up to: 3.0.5 Stable tag: 0.0.1 Allow Javascript in posts and pages allows the include of Javascript inside posts and pages, whilst retaining HTML tags and functional script == Description == Allow Javascript in posts and pages adds the functionality to include Javascript in wordpress posts and pages by adding a simple shortcode [js].code.[/js] This plugin strips away the automatically generated wordpress <p> and <br/> tags but still allows the addition of your own <p> and <br/> tags by using [p] and [/p] or [br/] or [a href='void(0)']link[/a] Please submit bugs == Usage == To add the Javascript code to your post or page simply place any Javascript code inside the shortcode tags. For example: If you wanted to add content that is visible to a particular user id: For example: a simple alert [js] alert('helloWorld'); [/js] This code will cause a popup when the page is loaded. in addition, should this code not be working (for example a missing ";") simply just change the [js] to be [js debug=1] [js debug=1] alert('helloWorld'); [/js] = Some Important Notes = This plugin strips away all instances of <p> and <br /> therefore code has been added so that if you wish to use tags in your output (e.g.): [js] alert("hello <br /> world"); [/js] the < and > tags will need to be swapped for [ and ] respectively so <p> becomes [p] and </p> becomes [/p] which is converted back to </p> at runtime. these [ ] work for all tags (p, strong, em etc.). [js] alert("hello [br /] world"); [/js] == Installation == 1. Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation 1. Activate the Plugin from Plugins page == Misc == Developed by Hit Reach Check out our other Wordpress Plugins Version: 1.0 Support & Comments == Change log == = 0.0.1 = * Initial Release == Frequently Asked Questions == = What Tags Are Automatically Removed? = Currently all <br /> and <p> (and its closing counterpart) tags are removed from the input code because these are the tags that Wordpress automatically add. = How Do I Add Tags Without Them Being Stripped? = If you want to echo a paragraph tag or a line break, or any other tag (strong, em etc) instead of enclosing them in < and > tags, enclose them in [ ] brackets for example [p] instead of <p> The square brackets are converted after the inital tags are stripped and function as normal tags. = Thats All Good But I want To Include A [ and ] In My Output! = To include square brackets in your output simply add a \ before it so [ becomes \[ and ] becomes \], again these are converted and will display as [ and ] = My Question Is Not Answered Here! = If your question is not listed here please look on: http://www.hitreach.co.uk/wordpress-plugins/allow-javascript-in-posts-and-pages/ and if the answer is not listed there, just leave a comment