Hyperlinks within Text to Open in New Window

Hyperlinks within Text to Open in New Window

by Stephanie Belt -
Number of replies: 2

Hello All!!

I would really love to find a way (if possible) to have a link within text open in a new window.  I know I can "Link to a file or web page" in a course and set that to open in a new window, but if I add a link while entering text in an HTML editor the link automatically opens in the same window. 

This is a problem for our end users because their desktops are extremely locked down.  They do not have access to any navigation features in the web browser which prevents them from surfing the web while at work and from easily getting back to Moodle, or a specific page within Moodle, if they are navigated away by one of our links.

Any help would be really appriciated!

Average of ratings: -
In reply to Stephanie Belt

Re: Hyperlinks within Text to Open in New Window

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi there- I wonder how you are making your links in the html editor? If you type in a web address or even a click here, and then select that text and click on the chain/link icon in the toolbar above, you can then choose where it says 'target' for it to be a new window. If you save it then, it will do as you want. Is that what you meant or am I misunderstanding you? smile
In reply to Stephanie Belt

Re: Hyperlinks within Text to Open in New Window

by Vasiliy Deych -
Hello Stephanie,

There are a few ways to do this.
First way:
When creating link with the HTML editor, highlight some text, and press the "link" button in the HTML editor toolbar. An "insert link" window pops up. In this window, change "Target" from "None" to "New Window".

Second way:
If you are working with the HTML source, and not the graphical editor, then create a link as follows:

<a  href="http://www.some-website.com">Link text</a>


I could also recommend using frames. If you have a frame on top with navigation links such as "Return to previous page", "Return to Moodle", etc., then users without a back/forward capability should not get stuck. Vasiliy