Jump to content

TinyMCE paypal button/form options

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?

Share this post

Link to post
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.

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

Share this post

Link to post
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"

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By franciccio-ITALIANO
      I create this paypal form by paypal site.

      <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="N922SN77XG7WE"> <table> <tr><td><input type="hidden" name="on0" value="Scegli uno di questi PIANI DI ASSUNZIONE A DISTANZA. Grazie!">Seleziona e clicca. Grazie!</td></tr><tr><td><select name="os0">     <option value="BRONZE - </option>     <option value="SILVER - </option>     <option value="GOLD - </option>     <option value="PLATINUM - </option>     <option value="DIAMOND - e</option> </select> </td></tr> </table> <input type="hidden" name="currency_code" value="EUR"> <input type="image" src="https://www.paypalobjects.com/it_IT/IT/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal"> <img style="text-align:center;" alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1"> </form>  
      Now I put it into my html file template. Ok.
      But can I put it into another file html?
      It isn't part of the template!
      The same template I use in another pages, but that form don't want is there and anywhere! 
      Exist a form modules for processwire, with an api or code - string for link it from template file?
      Excuse me if I don't explain my problem well. 
    • By hellomoto
      I have a Pages field with a PageListSelectMultiple input fieldtype, and I cannot limit it through the "custom PHP code" filter in its settings. I don't want hidden pages to be selectable, because the field is supposed to be to select pages to be included in a frontend menu. How can I do this? and it would be nice to be able to use the custom php code way to filter...
      Also, I cannot install, or activate, rather, TinyMCE. It's claimed to be compatible with 2.5... I install it, and when I try to activate it, without fail, it "activates" CKEditor, which is already activated by default, and installs its files into the /site/modules/ directory. TinyMCE is still in there, just inactivated and useless, being that there's no workaround to activating modules besides from the admin (that I know of, and it should work via the admin anyway). I also tried using BatchChildEditor (supposed to work with 2.5) -- don't seem to do anything when activated. I selected some settings and nada.
      Does anybody have any idea why I might be having these problems? I got all green for all the install compatibility checks...
    • By Thomas108
      Hi everybody,

      I am trying for a while now to display the alt tags as captions from images inserted via tinymce.
      I read this (and a few other) threads: https://processwire.com/talk/topic/1344-captions-for-images-in-tinymce/

      ... and I installed Adrian's tinymce-image-caption,
      but it didn't work at all for me.

      Then I installed Teppo's TextformatterImageWrapper,
      again no change in the frontend.

      Finally I tried Ryan's approach which is also mentioned in the linked thread above.
      and again no change in the frontend output.

      The last days I felt like I fell in love with processwire, everything went very smooth, but today seems to be not my day.
      I have no clue what's wrong, maybe some pw (2.4.7) or php (5.4.32) version  problem? My template is valid html5.

      I just made a fiddle with ryans approach: http://jsfiddle.net/wqo4fk8o/10/
      Maybe someone can have a look and point me in the right direction?

      Thanks in advance,

    • By lucas
      I'd like to know if it's possible for you to integrate Paypal to the Form Builder module. I'd like to use the Form Builder to build a paid job listing. Job submissions would be only published to the site after the payment via Paypal (standard checkout).
      Could you tell me if this would be something you'd consider adding? That's the only thing keeping me from building this project with PW right now
    • By Kae
      Hey, guys!!!
      I'm having a very big problem with Tinymce in processwire. I feel so stupid about it, but can't find the solution. Hope someone can help me.
      When I change to html and paste html tags inside a <code> tag, they get converted and disapear. How can I avoid this?
      All Iwanted was to show some code examples. I feel so noob right now '-'
      Thank you =)
  • Create New...