Jump to content

TinyMCE paypal button/form options


boris
 Share

Recommended Posts

Hi all, 

I have been struggling lately to get TinyMCE to accept PayPal buttons (or as the code goes - Form).
 
My solution - to use html_entity_decode($body); to render the button properly, which works fine. However my problem is that TinyMCE will strip down the <p> tag from the PayPal form and won't allow for secondary styling e.g. align left, right, centre.

 
I wonder whether any of you had come across any solutions?

Link to comment
Share on other sites

Hi guys,

Thanks for the help, unfortunately I still get the same problem; the code would go from:

<p style="style here">[[paypal_button]]</p>

to something like:

<p style="style here"></p><form action="https://www.paypal.com/cgi-bin/webscr" method="post">	 <input name="cmd" type="hidden" value="_s-xclick"> 	 <input name="hosted_button_id" type="hidden"> 	 <input alt="PayPal TM The safer, easier way to pay online." name="submit" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" type="image"> </form>

I will try to find a different solution.

EDIT
I ended up creating a small jQuery fix that will look through the page, find PayPal forms and get its' style from the previous <p> tag; assuming there is any inline style.
It's a nasty fix, but it does the job for now.

Edited by boris
Link to comment
Share on other sites

Boris - I think your problem is you're trying to wrap a <p> tag around a <form> tag which I don't think you can do in HTML anyway (the browser will helpfully try to close the tag before the form).

Try wrapping it in a <div> tag instead and you'll have a lot more luck.

You could also just apply the styling directly in the form tag as well, so <form style="your-style-here"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...