here’s another workaround so the button can work with TinyMCE, but i admit it’s a bit insane. i should make a plugin out of it if anyone thinks it’s worth it.
prerequisites: be willing and able to edit your header.php file and insert some scripts into the head section. be willing and able to upload the prototype library to your site.
ok, here goes:
1) create your button in paypal and copy their form code and paste it into the HTML editor for TinyMCE.
2) find the line that has something like:
src=”https://www.paypal.com/en_US/i/btn/x-click-but24.gif”
3) change the ‘src’ part to ‘class’. yes, this is strange but you’ll see. it will work.
4) click ‘Update’ so the thing is saved.
5) download prototype.js from wherever (just google it) and upload it to /js/ (which means a js directory right off the root of your site)
6) insert the following code into the <head> section of header.php within your theme directory:
<script type=”text/javascript” src=”/js/prototype.js”></script>
<script type=”text/javascript”>
window.onload = function () {
var inputs = document.getElementsByTagName(‘input’);
$A(inputs).each(
function (input) {
if (input.type==’image’) { input.src=input.className;Element.setStyle(input, {margin:0,padding:0,border:0,background:’transparent’}); }
}
);
}; //end window.onload
</script>
That should be it. There’s a preview of this working at http://veganpeople.net/fun-ways-to-help/
I don’t claim that this won’t screw up other plugins. This code is going to operate on ANY input image within your blog without discretion.
So, make sure you back up everything you touch before you do it. Lots of luck to all. Let me know if this was useful and if there’s enough interest I’ll see about putting a plugin together and making the code a little more discriminate so it only touches paypal buttons.