v4.0.28

Working in a record

contents | prev | next

Most of the time you are working in eCAT, you will be working inside a record that contains the text editor.

The text editor

The text editor

That's the case with the Document we looked at in the An online notebook entry, and Experiment. It's also the case with most other kinds of eCAT records. The different kinds of records in eCAT are described here. This entry provides detail on the kinds of things you can do with the text editor and how to get the most out of it.

The Text Editor in eCAT is based on the TinyMCE library. It includes many capabilities (and a few oddities!) some of which are highlighted here:

Copying and pasting from Word, Excel, OpenOffice and other sources

top

The best way to get data from an office application or another source into eCAT is just to copy and paste the data. The easiest way to do this is to select the data you want to copy in Word or Excel, press CTRL+C to copy it, then select the eCAT record to paste it into, and press CTRL+V to paste. It is also possible to right click and select Copy in the source material and then right click again and select Paste in eCAT.

Its that simple, and it works with tables and other complex objects. You cant copy and paste image information that way however - see the section on inserting images for that.

The text editor includes several buttons for pasting from Word, Excel or OpenOffice, which can give better or different results than Ctrl-V:

Pasting controls

Pasting controls

These controls are not available in all web browsers. You should only use them if you have problems with standard copy and paste.

Inserting an image into a text field

top

Image control

Image control

The Insert Image button pops up a window to enable insertion of an image from a local file or from an already existing web URL.

The popup looks like the following.

The image popup for uploading

The image popup for uploading

You can browse your local computer for image files and when you click "Insert" the image will be automatically inserted into the text field. You can also use the description, alignment and dimensions properties to further control the display of the inserted image.

The image popup for linking

The image popup for linking

As well as using images on your local computer you can also display images that are already on the web by entering their URL into the ImageURL box shown above in the From Url tab in the image popup.

Switching into and out of Full Screen mode

top

Full screen mode control

Full screen mode control

You can use the Full Screen control to expand the edit window to take up your full browser window. Simply click the Full Screen control again to return to normal non-fullscreen mode.

Inserting, Deleting and Manipulating Tables

top

Creating a table

When you want to insert a table in the eCAT editor, you may find it easiest to create the initial table in Excel or Word or a web-authoring tool such as KompoZer. You should then be able to copy the table and paste it into the eCAT editor.

Table controls

Table controls

For simple tables, however, you may find it quicker to create the table in the eCAT text editor. Create a table by clicking the Insert Table control. This will pop up a window which allows you to set the number of rows and columns, as well as other parameters. You can adjust all these parameters including the numbers of rows and columns later, if you need to. You can include a table caption, but this always appears at the top of the table rather than the bottom.

Once you've clicked Insert, you'll have a table in your text area. However, by default the table cells are very narrow, making it difficult to enter data. It is much easier if you click the Table Cell control. This will pop up a window which allows you to set the minimum width and height of the cells (in pixels). A good value to use to start with is 10 pixels - again you can adjust this at any time. Don't forget to select this to apply to all the cells in the table before you click Update.

Modifying a table

The easiest way to modify a table is with the Table Menu, which is accessed by right-click in a table: Alternatively, the editor controls can be used:

If all else fails...

If all else fails you can work with the raw html. For example, if you needed to delete a table this way, you would click on the HTML button. This shows you the raw html:

Deleting table HTML

Deleting table HTML

Find your table element (<table>... </table>) and delete it all (the <table> and everything up to and including the </table>).

Time and Date

top

The text editor includes buttons for inserting time and date automatically.

Other controls

Other controls

The Date and Time controls insert the current date and time into your text where your cursor is. This can be useful for creating an Experiment log.

Special Characters, Subscripts and Superscripts, Linking to other websites

top

The text editor includes buttons for inserting special characters, and for making text be a subscript or superscript.

Other controls

Other controls

The Special Character control pops up a window which allows you to insert special characters such as fractions and mathematical symbols into your text where your cursor is.

The Superscript and Subscript controls allow you to turn text into a superscript or subscript. This can be useful for creating an Experiment log.

Can't insert a new line before/after an image or table?

top

After you have inserted an image or a table, you may sometimes have trouble adding text before or after the image.

Images. If you click to the right of the image, and start typing, you will see text appear. You don't see the cursor at first, but it is there. Similarly, if you click to the left of the image and start typing, you will see text appear before the image.

Tables. If you insert a table with no new (empty) lines before it or none after, then you may find it difficult to place the cursor before or after the table to insert text. You may find that the cursor insists on being within the table.

If you have this problem, the simplest thing to do is click on the HTML button. This shows you the raw html:

Working with tables

Working with table HTML

Find your table element (<table>... </table>) and insert a new paragraph (<p></p>) before or after it. Usually there is a <p> before the table element and a </p> after the table element. If this is the case your <p></p> should be inserted before the <p> and/or after the </p> as shown below.

Working with tables

Fixing table HTML

Click update button and you should be able to select the new line you have created.

If you are still having difficulties, you may find that it is easier to compose your table and other text in another web-authoring environment such as KompoZer. You can then copy the raw HTML from the web-authoring tool and paste it into the raw HTML window. Beware that complex styling may not transfer correctly!

Problems with pasting? Extra data inserted?

top

Sometimes after pasting data into eCAT we see some erroneous html code or other data has been added with our paste. For example:

Cleaning bad paste data

Cleaning bad paste data

This shows a table that was inserted, but also (highlighted) some junk. How do you get rid of the junk? There are a number of ways that can work (but they don't all work always!):

The HTML editor can also be used with web-composing tools such as KompoZer. You can copy raw HTML from the web-authoring tool and paste it into the raw HTML window in the eCAT editor. However, beware that complex styling may not transfer correctly!

Links to pages and images on websites

top

When you are editing a record with a field of type Text, you can use that field to make links to images and external websites.

Other controls

Inserting a link

The Insert Link control pops up a window which allows you to paste in a link to a web page. Copy the URL you want to link to, select the text you want to be the link, click this control, and paste the URL into the window. Note that eCAT does not make a copy of the page you are linking to - if the web page is changed your link will access the new content, and if the web page is deleted your link will not access anything. To keep a copy of the web page as at the time you made the link, turn it into either an image or a file, upload it to eCAT as a file, and link to the uploaded file.

Links between records

top

It often will also be useful to create links between two related records. This is just like making links to files. You simply put a link to the other record in the desired field of the current experiment.

To do this, edit any record with a Text or Reference field in it, then click the "Browse record tree and link to records" button in the editor control as shown below.

The linking to a record button

The linking to a record button

The following window will pop up.

Linking to a record

Linking to a record

Use the tree on the left or the search on the right to find a record and then click on it. The record you selected will appear in the Insert selected record link section. Click "Insert" to make the link to the record.