We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8425
    • 159 Posts
    Hello,
    I’m using the latest MODX 1.0.5 evolution. I’ve noticed that when in edit mode with TinyMCE Rich text editor if I have a statement like
    <a class="customStyle" href="[(base_url)][~136~]">Photo Gallery</a>
    it will be stripped to the following when I save the rich text editor
    <a class="customStyle" >Photo Gallery</a>

    href are removed. What do I need to change in TinyMCE to prevent this behavior? It used to work fine with MODX 1.0.4. Does anyone has the same problem?
    Thanks in advance for your help.
      • 18913
      • 654 Posts
      In an effort to prevent TinyMCE from screwin’ with my code after saving a table in RTE mode, I used these settings recently (in the "custom parameters" block) :
      forced_root_block : 0,
      verify_html:false,
      extended_valid_elements : "div[*]",
      verify_css_classes:false,
      remove_redundant_brs:false
      

      Hope it helps,
      Matt
      PS Using Evo 1.0.5
        • 36404
        • 307 Posts
        Hi,

        the fact is you don’t need the base url in your href, actually it’s redundant [~136~] being a full url link for MODx
        .
        Have a try, when you set up a link in tinyMCE, you have a link list containing all the ressources, choose your photo gallery and have a look at the link syntax

        <a class="customStyle" href="[~136~]">Photo Gallery</a>


        something you could write without having tinyMCE erasing your href

        Have swing
          réfléchir avant d'agir