6 Text Formatting
emsquared edited this page 2013-04-07 01:36:48 -07:00

The following documentation is targeted at version 2.1.1 of Textual and later.

Keyboard Shortcuts

Selected text within the main input box of Textual can be formatted using the following keyboard shortcuts:

                                         Action                                                                                   Shortcut                                         
Bold Command B (⌘B)
Italics Command Option + I (⌥⌘I)
Underline Command Option + U (⌥⌘U)
Foreground Color Command Option + C (⌥⌘C)
Background Color Command Option + H (⌥⌘H)

These options can also be accessed through the right click menu.

Technical Details

Textual, like many other IRC clients, use caret notation for formatting.

The following is a list of the control characters handled by Textual for formatting.

Bold, Italics, Underline

  • Bold: U+0002 ("0x02") — Example: ^Bold Text^ whereas ^ represents the control character.
  • Italics: U+0016 ("0x16") — Example: ^Italicized Text^ whereas ^ represents the control character.
  • Underline: U+001F ("0x1F") — Example: ^Underlined Text^ whereas ^ represents the control character.

Foreground & Background

The color control character handles foreground and background color information in one pass.

The control character used for color is U+0003 ("0x03").

There are fifteen (15) possible colors that can be defined for either color. The color codes are as follows:

0. White
1. Black
2. Blue (Navy)
3. Green
4. Red
5. Brown (Maroon)
6. Purple
7. Orange
8. Yellow
9. Light Green (Lime)
10. Teal (Green/Blue Cyan)
11. Light Cyan (Cyan) (Aqua)
12. Light Blue (Royal)
13. Pink (Light Purple) (Fuchsia)
14. Grey
15. Light Grey (Silver)

The color control code is sent in the format: ^<00-15>[,00-15]Colored Text^ whereas ^ represents the control character.

The first number is the foreground color and is required. If the foreground color is below or equal to nine (9) then it should be proceeded by a zero (0). The same applies for background color.

The second part of formatting is the background color proceeded by a comma. Background color is optional.

Examples:

^14Colored Text^ — Grey colored text.
^14,13Colored Text^ — Grey colored text with a pink background.
^00,01Colored Text^ — White colored text with a black background.