We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24632
    • 2 Posts
    I am trying to use TInyMCE to create a page in MODX which has a link to Paypal. The code for the link uses the <input> tag.

    I click on the HTML link in the TinyMCE editor to paste the code given to me by Paypal, but each time I save the code and I go back to look at it, there are extra words added somehow such as "checked" and "disabled" and the link doesn’t work. I understand this is part of the TinyMCE cleanup and when I disable cleanup on the plugin configuration screen it all works fine.

    The problem is that firstly I don’t want to disable cleanup and secondly I can’t find anywhere in MODX where you can allow tags like <input> (and many others is am sure).

    I have read that you can specify what are valid elements and which aren’t by editing some files. I checked the tinymce.functions.php file and the xconfig.js and they make reference to it but surely MODX don’t expect amateur users like me to be changing these files? Is there not an easy way in MODX (and I mean the front end CMS part) to allow tags such as <input> to remain unchanged?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      1. For a document like that, don’t use TinyMCE.

      2. Put the copy/paste code in a chunk and include the chunk tags in your document content.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 24632
        • 2 Posts
        Hey, thanks for that I will try it.

        I am still interested in solving the original problem, though. Where can you edit/change the allowed tags/valid elements in MODX without editing the configuration files directly?

        What makes me curious (and frustrated) is that I can put <input> tags in HTML code on one of my client’s MODX installations and it works fine but not on my test environment and I can’t see the difference between the two setups.

        I have searched all the documentation and internet sites I can (for days now smiley but still can’t see where you specify this. It would be nice to know for future reference.
          • 28522
          • 29 Posts
          I’m having this same issue. My client wants to put just basic form inputs in a page (they aren’t even part of a form!) and he can’t because TinyMCE adds in ’disabled and ’read only’ properties to every <input>. Is there a solution for this???