jsEditor - Links

Aim: to demonstrate how to use links with the jsEditor

General: Double click on the directories and note this is how you navigate your hard disc. As you change directories, the list of filenames will change.

Click on a file and notice that its relative path appears in the edit box below 'Relative Path' and its title appears below that.

Click on a few files here and there and note the relative path and the title.

If the current file is not saved, then the 'Relative Path' will appear as an absolute one, using the drive letter, etc.

jsEditor will NOT use this and if you try to make a link, it will tell you to save the file first. It does not guess where you might eventually save your file.

Creating links is extremely easy with the jsEditor.

  1. Ensure the main file has been saved (so it has a name!)
  2. Navigate to the file you want to link to (Double-clicking on directories as necessary), and click on the file you want in the file box. A relative path and file title (if it has one) will appear in the boxes.
  3. Select some text for the link, or click where you want your link (jsEditor will use the file title).
  4. Select 'Main Menu View: Show HTML buttons' and click on LINK (or right-click on the HTML mode button and choose Link).
  5. Press F9 to view the file in the Viewer and test the link (to give yourself practice with the Viewer).
  6. You have your link.

I linked to computerContents.htm and got this (jsEditor automatically supplied the link text from the title: 'Computer Stuff'):

<A HREF="computerContents.htm">Computer Stuff</A>

I also typed: 'Various tutorials', selected this text, and clicked on Repeat Last and got this:

<A HREF="computerContents.htm">Various tutorials</A>

jsEditor used my text this time.

Sometimes we use the link as part of the text. On other occasions we are making a list of links. It isn't hard to type a <BR> for the list, but when we have a lot of these links, we can use the LINK WITH BR button which adds the break automatically.

I have decided to add a list of links as a mini TOC.

I double-click on the directories to get to JavaScript. I click on the file index.html.

I note that its Relative Path is: JavaScript/index.html.

I note its title is: 'How to do JavaScript ..'

I click LINK WITH BR button and get:

<A HREF="JavaScript/index.html">How to do Java Script - javascript tutorial</A><BR>

jsEditor adds the BR and also adds the file's default title. I can add a few more links by adding Repeat Last.

<A HREF="JavaScript/index.html">How to do Java Script - javascript tutorial</A><BR>

<A HREF="HTMLGuide/index.html">HTML Tutorial Contents - many pages!</A><BR>

<A HREF="StyleSheets/index.html">index</A><BR>

When creating a list of links, it is extremely useful to add the BR automatically (saves fiddling about) and greatly increases productivity.

Click on PLAIN LINK. I got:

<A HREF=""></A>

Sometimes (rarely) you just need a plain old link!

Click somewhere in your page and Click on EMAIL LINK.

A box appears and I kept the default and clicked OK. I got:

<A HREF="MAILTO:me@my.com?SUBJECT=My Page ">email</A>

The default text gives me a clue to what I should type. I could have changed 'me@my.com' to And typed in a different subject for the e-mail. As I did not select any text before clicking on EMAIL LINK jsEditor used email as the default text.

Type feedback and select it. Then click on REPEAT LAST (if the last one was EMAIL LINK, otherwise click on that button). Type in your own e-mail and your own subject. I got:

<A HREF="MAILTO:me@my.com?SUBJECT=My jsEditor Tutorial ">feedback</A>

Click on BOOKMARK. (Bookmarks are also called anchors). Accept the default text. I got:

<A NAME="bottom"></A>

Normally you would select some text which you want to anchor for a bookmark. So this time type some text and select the text you want for a bookmark. I typed: 'Bottom of page' and I got:

<A NAME="bottom">bottom of page</A>

Click on TOC. I get a message asking me if I want to make a TOC from all the files in the current directory. Click YES to continue (or NO, if you clicked the wrong button to cancel). A list of links appears at the cursor position for all the files in the current directory. The current file must have been saved and there must be some files in the current directory.

This is a quick and easy way to make a TOC for the current directory.


You have learned how to: