EditLive! 9 Documentation : comboBoxItem

This element contains the information required by Tiny EditLive! to configure an item within one of the EditLive! combo boxes.

Configuration Element Tree Structure

<editLive>
<toolbars>
<toolbar>
<toolbarComboBox>
<comboBoxItem>

<editLive>
     ...
     <toolbars>
          <toolbar>
               <toolbarComboBox ... >
                    <comboBoxItem ... />
               </toolbarComboBox>
          </toolbar>
     </toolbars>
     ...
</editLive>

Required Attributes

name

The value of the name attribute is different depending on the type of combo box being configured. The following gives information on the way that the name attribute is used in each case:

Style Combo Box

This attribute gives the value to be used when the item is being inserted into the HTML source code. When used in the Style combo box the name attribute gives the name of the tag inserted into the HTML source code within EditLive!.

Example: If the name attribute was set to H1 then the <H1> tag would be inserted into the HTML when this style was used.

Typeface Combo Box

This attribute gives the value to be used when the item is being inserted into the HTML source code. When used in the Typeface combo box the name attribute gives the value used for the face attribute within the <SPAN> tag used within the EditLive! HTML source code.

Example: If the name attribute was set to Times New Roman then the following <SPAN> tag would be inserted into the EditLive! HTML source code:

<SPAN style=" font-family: 'Times New Roman';"></span>

Size Combo Box

This attribute gives the value to be used when the item is being inserted into the HTML source code. When used in the Size combo box the name attribute gives the value used for the size attribute within the <span> tag used within the EditLive! HTML source code.

The value assigned to this attribute can be of the following formats:

W3C Accessible Sizing

Specifying a number between 1 and 7 will create a W3C Accessible value for the size attribute created. The following list details the W3C Accessible value created for each 1 - 7 value specified for the name attribute.

Name Attribute Value

Span Tag Created

1

<span style="font-size: xx-small"></span>

2

<span style="font-size: x-small"></span>

3

<span style="font-size: small"></span>

4

<span style="font-size: medium"></span>

5

<span style="font-size: large"></span>

6

<span style="font-size: x-large"></span>

7

<span style="font-size: xx-large"></span>

Example: The following combo-box item will display the text 12pt.

<comboBoxItem name="3" text="12pt" />

If the above combo-box item is selected, the following tag will be created:

<span style="font-size: small"></span>

Size and Format Combination

You can specify the specific font size and format you wish the combo-box item to create. EditLive! supports various size formats such as pt, % and px.

Example: The following combo-box item will display the text at 14pt.

<comboBoxItem name="14pt" text="14pt" />

If the above combo-box item is selected, the following tag will be created.

<span style="font-size: 14pt"></span>

Optional Attributes

text

This attribute gives the value which appears inside the relevant combo box within EditLive! (eg. Heading 1, Normal, 12pt, Times New Roman).

In EditLive! 6.0 and above, use of the text attribute is no longer recommended for the style combo box as default names are included along with translations for each supported interface language. All common block tags are included in the list of default names:

  • P
  • DIV (in 6.4 and above)
  • H1-6
  • PRE
  • ADDRESS
  • TD
  • TH
  • TR
  • TABLE
  • LI
  • UL
  • OL
  • DD
  • DT
  • DIR
  • MENU
  • DL

Example

The following example adds the H1 style to the Style combo box so that it appears as Heading 1 inside the combo box in EditLive!. Also added is the Arial font to the Typeface combo box; it is listed as Company Font in the combo box. Finally, the HTML font size 3 is added to the Size combo box and listed as 12pt.

All the combo boxes in this example are added to the Format Toolbar.

<editLive>
    ...
    <toolbars>
        <toolbar name="format">
            <toolbarComboBox name="Style">
                <comboBoxItem name="H1"/>
            </toolbarComboBox>
            <toolbarComboBox name="Face">
                <comboBoxItem name="Arial" text="Company Font"/>
            </toolbarComboBox>
            <toolbarComboBox name="Size">
                <comboBoxItem name="3" text="12pt"/>
            </toolbarComboBox>
        </toolbar>
    </toolbars>
    ...
</editLive> 

Remarks

The <comboBoxItem> element can appear multiple times within the <toolbarComboBox> element.

The <comboBoxItem> element must be a complete tag, it cannot contain a tag body. Therefore the tag must be closed in the same line. See the example below:

<comboBoxItem name=... />