Tips and Tricks
Using SWFObject
If you're interested in making your page valid HTML 4 or XHTML, you'll need to use the object tag instead of the embed tag.
This comes with significant hassles, though, so you'll want to use the SWFObject library to do so. As an example, the following embed code:
becomes this:
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("http://embedit.in/IMAFoJ4xKU.swf", "embed_IMAFoJ4xKU", "466", "400", "9.0.28", false, {}, {allowFullScreen: true});
</script>
Be sure to swap in your own ten-character embed identifier in the example code.
Customizing embedit.in Sitewide
Out of the box, embedit.in Sitewide automatically converts any links on your page to PDF, Word, Excel, or PowerPoint files to use embedit.in in an overlay on your page instead. You can change which links it edits with a simple JavaScript call, which you should include in another script tag below the one that you've already pasted in for embedit.in Sitewide:
EmbedItIn.extensions = /.*\.(pdf|doc|docx|xls|xlsx|ppt|pptx)$/;
</script>
EmbedItIn.extensions is a regular expression that will be matched against the href attribute of each of your links. You can set it to anything you like.


