Inserting Elements with Required Attributes

Some elements require attributes. For example DITA topics require the ID attribute and Docbook ulink requires the url attribute. When you insert such an element, you'll be prompted to specify the required attribute value.
  1. Place the cursor in the position for insertion.

    Place the cursor in the Editing Window or in the ContentMap in the position where you want to insert the element.

    Note:

    Sometimes the insertion of an element is required .

  2. Call up the Insert Element Dialog.

    To call up the Insert Element Dialog (or move the focus to the docked Insert Element Dialog), do one of the following:

    • Press Ctrl-Enter.

    • Choose Element > Insert Element .

    • Click the Insert Element button on the toolbar.

    • Right-click and select Insert Element from the context menu.

    The Insert Element Dialog will appear. The dialog shows an alphabetically sorted list of elements available for the current context if validation is on. The 5 most recently used elements are shown in bold at the top of the list.

    Figure 1. Insert Element Dialog.



    Note:

    The Insert Element Dialog is a " liquid dialog": it can have a different, docked appearance. For more information about liquid dialogs, see "Liquid" Dialog Boxes and Dialog Docking.

  3. Choose an element to insert.

    In the Insert Element Dialog, do one of the following:

    • Find the element and double-click it.

      Note:

      If you know exactly which element you need, you can start typing its name and it will be offered automatically.

      Tip:

      To find a proper element for insertion, move the mouse pointer over elements and see a tooltip with short help for each element.

    • Select the element and click the Insert button or the Insert Element button .

    • Select the element and press Enter.

    • Press Alt-number to pick a corresponding recently used element shown in bold.

    The Required Attributes Dialog will appear.
  4. Specify the value of the required attribute. In the Required Attributes Dialog, do the following:
    1. In the Value field, type the value of the attribute.
    2. Click OK.
    The element will be inserted with the specified attribute value.

Example. Inserting the ulink element in the ContentMap.

Suppose we want to insert the ulink element after the orderedlist element in a Docbook document. It is more convenient to find this position in the ContentMap than in the Editing Window.

  1. Click the empty branch in the ContentMap - the end of the para element.

    Let's insert a new element there.



  2. Press Ctrl-Enter to call up the Insert Element Dialog.

  3. In the Insert Element Dialog, select the ulink element.

  4. In the Required Attributes Dialog, enter the value of the url attribute. Click OK .



  5. The ulink element has been inserted.



  6. Type the content of the ulink.



Related tasks
Inserting Required Element