User's Guide

Options Panel

Let us begin by familiarizing ourselves with the various option offered in the BiDi Mail UI Options Panel. The effect of each option will be explained and demonstrated in the following section.

In Mozilla 1.x Suite and in Seamonkey, the BiDi Mail UI Options Panel appears as a separate branch under the main preferences tree (Edit -> Preferences -> Mail & Newsgroups).

bidiui-messenger-prefs-suite.png

In Thunderbird, one has to open the Extensions Manager (Tools -> Extensions), then double click the BiDi Mail UI entry. This will open the extension options panel:

bidiui-messenger-prefs-tbird.png

Automatic direction detection for displayed messages

BiDi Mail UI automatically detects and sets the proper direction of displayed plain-text messages. The auto-detection logic is to search the text for lines which begin or end with expressions in a Right-to-Left script or language. If such a line is found, the direction of the entire document is set to Right-to-Left. For example, the following message:

bidiui-messenger-all-rtl-one-ltr-word.png

Will be right-aligned. This next message:

bidiui-messenger-all-ltr-one-rtl-word.png

will be left-aligned. If the word كلمة had appeared at the beginning of the line, though, the message would have been right-aligned. Thus when your text message has both blocks of Right-to-Left and Left-to-Right text, the direction is set to Right-to-Left.


Automatic Correction of Misdetected Character Encoding for Displayed Messages

Without the extension installed (and without forcing a specific character encoding on all messages), one often encounters messages in Hebrew or Arabic which display this way:

bidiui-messenger-charset-error.png

Instead of you having to change the character encoding manually (from the View menu, from ISO-8859-1 to Windows-1255 for instance), BiDi Mail UI autodetects this situation, sets the character encoding to the correct value, and of course also sets the direction appropriately:

bidiui-messenger-charset-corrected.png

Changing direction of displayed messages

In addition to auto-detection, BiDi Mail UI also provides manual direction control over the displayed message. This can be done in three different ways:

bidiui-messenger-context-menu-before-switch.png
bidiui-messenger-view-menu-before-switch.png

As a result, the direction switches to the opposite of the previous one:

bidiui-messenger-message-after-switch.png

Setting the default direction for new messages

When composing a new message without BiDi Mail UI, Mozilla sets Left-to-Right as the default direction. However, with this extension, there are two factors that effect the direction of new messages: The default direction (either Left-to-Right or Right-to-Left) and an option that allows to keep the direction of the original message when replying (rather than using the default direction). Both are user-set options that appear in the Message Composition section of BiDi Mail UI options panel.

For example, if one chooses Left-to-Right as the default direction, but keeps the option "Always Reply in the Default Direction" unchecked, clicking "Compose" to start a new message will open a new window with Left-to-Right direction:

bidiui-new-message-ltr.png
(Note the two direction control buttons – RTL/LTR – in the main toolbar; We shall touch upon these two later on.)

However, if you reply to a message that was tagged by the automatic direction detection as Right-to-Left, the reply will also be set as right-aligned.

bidiui-reply-rtl.png

Changing direction when editing plain text messages

In plain text messages there is only one single direction – the global message direction. BiDi Mail UI provides four ways to control this direction:

This action will align the message to the opposite direction of the current one (as described above for displaying messages):

bidiui-composer-message-after-switch.png

Changing direction when editing HTML messages

In HTML messages, each paragraph can be to a different direction. BiDi Mail UI changes the behavior of the message editor, so that pressing Enter starts a new paragraph (similar to OpenOffice and MS Word). Shift+Enter starts a new line within a paragraph.

The Design toolbar now includes two direction buttons that also display the current paragraph direction:

bidiui-composer-html-current-dir.png

These two buttons also display the direction of text which is selected from several paragraphs – as long as it's a single direction. If the selected text uses both directions, the buttons are depressed to signify this.

bidiui-composer-html-no-single-dir.png

Changing the direction of a paragraph requires placing the caret within it. Alternatively, text from several paragraphs can be selected, so that changing the direction effects all selected paragraphs.

There are three ways to set the direction:

Configuring the space between paragraphs

By default, BiDi Mail UI does not introduce any additional space between paragraphs. As a result, new lines and new paragraph look the same (there still is a semantic difference between them though). If you want to visually separate paragraphs from one another, open the extension's options panel and set the Paragraph Vertical Margins to a value higher than the initial 0; the value can be set in either centimeters, pixels or points (the size unit for fonts). An example:

bidiui-composer-vertical-margins-1cm.png

Changing the global direction of HTML messages

Paragraphs that do not carry an explicit direction are displayed using the global message direction. This can be changed via the "Switch Message Direction" function, under the View menu. The user-set direction of specific paragraphs can be cleared using the "Clear Paragraph Direction" under the Format menu.


Inserting Direction Control Characters

The Unicode Standard includes various special characters for controlling its display more precisely than by its set external direction. Two of the more important among these are the LRM (Left-to-Right Mark) and the RLM (Right-to-Left Mark) . The BiDi Mail UI Extension allows insertion of these characters into plain-text and HTML messages, by selecting one of them from the Menus: Insert->Control Characters :

תמונה: bidiui-composer-insert-menu-before-lrm.png

or from the composition area context menu (in the Insert Control Characters submenu):

תמונה: bidiui-composer-context-menu-before-lrm.png

A third alternative is to use accelarators (shortcut keys): Ctrl+Shift+L for an LRM mark, and Ctrl+Shift+R for an RLM mark.

But these characters are invisible – only their effect on the display of the text may be discerned:

תמונה: bidiui-composer-message-after-lrm.png

However, these characters are an integral part of the message text, and are saved with it – both in plain-text and HTML.