The shortcode included with my recommended Caspio WordPress plugin can be used to streamline publishing of embedded apps as well as SEO publishing.
Embedding the Caspio JavaScript code using the WordPress editor works fairly well as long as you switch from Visual to HTML editing mode first. However, there is potential for scrambling the JavaScript content if you go back and forth between the Visual and HTML modes. Some users may also find it more convenient to work within the Visual mode.
The problem with pasting your JavaScript snippet into the Visual editor is that converts tags to HTML entities and adds some coding of its own:
If you publish it that way, you get a messy code listing instead of the app you’re trying to publish.
However, if I wrap that same block of code within a [caspio][/caspio] shortcode, I instead get the app as shown below. The shortcode function extracts the server url and app key, then regenerates the code.
[caspio]
<div id=”cb5F422000c3f2d8h4d3c9f4b9g9e0″><a href=”http://www.caspio.com” target=”_blank”>Online Database</a> by Caspio</div><script type=”text/javascript” src=”https://b4.caspio.com/scripts/e1.js”></script><script type=”text/javascript” language=”javascript”>try{f_cbload(“5F422000c3f2d8h4d3c9f4b9g9e0″,”https:”);}catch(v_e){;}</script><div id=”cxkg”><a href=”https://b4.caspio.com/dp.asp?AppKey=5F422000c3f2d8h4d3c9f4b9g9e0″>Click here</a> to load this Caspio <a href=”http://www.caspio.com” title=”Online Database”>Online Database</a>.</div>
[/caspio]