Inserting a Web link in an image

Inserting a Web link in an image

John Isner發表於
Number of replies: 6
I have tried to insert a Web link into an image using the HTML editor (i.e., so that when a user clicks the image, a new window pops up with the target URL).

I left-click on the image, selecting it, click the Link icon in the toolbar, and type in the URL. When I close the dialog, the image disappears and the image's alternate text appears, underlined in blue. The image is no longer visible, and it has been removed from the HTML.

What is the proper way to use an image as a link, or is this something that can't be done?

評比平均分數: -
In reply to John Isner

Re: Inserting a Web link in an image

Dr S Bhatia發表於
Hi John

This problem was projected earlier,too by someone and i HAD TRIED TO REPRODUCE IT but failed. In my Moodle, 1.6.1, the linking of images works perfectly. maybe something to do with version. what version are you using?
In reply to Dr S Bhatia

Re: Inserting a Web link in an image

John Isner發表於
Ah, you are right, I knew I had done this successfully in the past. I just tested it on my 1.6.1 site, and it works properly! I'm having the problem with 1.6.3.
In reply to John Isner

Re: Inserting a Web link in an image

Timothy Takemoto發表於
You could try (after backup) porting the lib/editor folder accross form 1.6.1 to your newer installation but the problem may be eslewhere.
Do you have a "~" tilde or ":" colon in url of the image?
In reply to Timothy Takemoto

Re: Inserting a Web link in an image

John Isner發表於
No tildes.

Here is the HTML prior to the insertion of the link:

<img title="abstract one" alt="abstract one" src="http://192.168.1.104/training/file.php/3/thumbnails/004_images_004.jpg" border="0" height="113" hspace="0" vspace="0" width="150" />

Here it the link I attempted to insert:



Here is the HTML after insertion:

<a href="http://192.168.1.104/training/file.php/3/fullsize_images/modern_art.JPG">abstract one</a>

Which displays as the attached image.




附件 Link_insertion_problem.png