This example demonstrates how to use the StyledText widget to implement a text editor with formatting support. The example has a typical text editor interface. The Edit menu contains Cut, Copy, Paste and Set Font items and the toolbar provides a bold text toggle, three colour tools that operate on the current selection, and a reset to defaults button that also operates on the current selection.
Follow the Manual Setup instructions to install and run the example from your workspace.
The "Main" class is org.eclipse.swt.examples.texteditor.TextEditor
.
This example can also be run using the Example Launcher. Select the Text Editor item from the Standalone category and click Run.