We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40088
    • 708 Posts
    Stupid question:

    I inserted an image through Tiny and want to wrap the image in a link to an external site like so:

    <a href="somesite.com"><img src="image.jpg" alt="Stuff" />Link Here</a>
    but the link tag goes missing. What gives? Even if I hand-code it in it doesn't work.

    Revo 2.2.5
      Todd
    • Not a stupid question. That's stupid if you ask me.

      Is it just that one resource?

      Check the tinyMCE settings in system settings. Is it set to strip tags somehow? Do you get the image tag but not the link?
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 40088
        • 708 Posts
        I don't see anything about stripping tags in the Tiny settings.

        It appears to happen with just one resource (homepage). I have 3 other pages where I was able to wrap smaller images in a link. It's odd.

        Here's what happens:

        1. I insert the image via Tiny.
        2. I select/highlight the image then click the "Insert/Edit Link" button.
        3. I type the url https://www.dropbox.com/s/txz3gq2vwo2iau0/link1.png
        4. Here's where it gets strange. I hit the "Insert" button but the window doesn't close and it moves upwards slightly and I have to click the "X". https://www.dropbox.com/s/8h4rqimsmkchsjg/link2.png

        This particular image is about 350x520. Now, I don't know why it would matter when adding a link but could that be the problem, the image is too big? The images I am able to wrap in a link are much smaller (thumbnails). All on different pages.
          Todd
        • Stumped.

          Bump
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 40088
            • 708 Posts
            Yeah, so am I. It would seem that everywhere else on the site it works as expected except this one place. Oh well.

            Thanks
              Todd
            • Maybe it's just a naughty resource, and needs to be fired. Can you recreate it and use the new one effectively?
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 40088
                • 708 Posts
                I think I know why it's not working.

                I have an h2 heading followed by a couple paragraphs. I wanted to insert an image before the heading and float it right so the top of the image would align with the h2 heading and the text would flow down the left side of the image (which it does). What I didn't realize was that the image got wrapped in the h2 tag and I've only been selecting the image not the outer h2 text. However, if I insert the same image somewhere else within the run of text it gets wrapped in a p tag and then I'm able to attach a link to it.

                The code generated by Tiny:

                <h2 style="text-align: center;">
                <img style="float: right;" src="resources/magCoverThumb.jpg" alt="ad" width="191" height="300" />Click <a href="http://somesite.com">here</a> to view Past Issues</h2>
                <p>Paragraph 1</p>
                <p>Paragraph 2</p>
                <p>Paragraph 3</p>
                [ed. note: todd.b last edited this post 11 years, 6 months ago.]
                  Todd