Skip to main content

Nebula RichText

The Nebula RichText project mainly contains two controls for dealing with HTML formatted text:

  • RichTextEditor for creating HTML formatted text
  • RichTextViewer for rendering HTML formatted text

RichTextEditor

The RichTextEditor is a WYSIWYG editor control to create HTML formatted text. It is based on CKEditor and wraps a SWT Browser for integration. It supports several customization options, e.g. modifying the toolbar, and provides callbacks to interact with the control using Java code, similar to interacting with a simple SWT Text control. It is not necessary to know about the underlying Javascript, although it is also possible to interact via Javascript code.

It is possible to customize the toolbar by creating and setting a custom ToolbarConfiguration. The default toolbar implementation contains all features that are currently supported by the RichTextViewer. For example, rendering and handling of links and images is currently not supported by the viewer, therefore these toolbar items are not enabled by default.

This control is useful to quickly create rich text that has to be displayed on a web page, for example if you want build a web content management system in a Eclipse RCP desktop application.

Features

  • WYSIWYG editor to create HTML formatted text
  • POJO/RCP/RAP: can be used in a SWT standalone, RCP and RAP Applications.
  • Customizable toolbar

RichTextViewer

The RichTextViewer is a control that is able to render HTML formatted text. It works well with output generated by CKEditor. Technically it is a subclass of SWT Canvas and uses the RichTextPainter that is provided by this project for painting HTML formatted text on a GC.

JFace Viewer Integration

The RichText project contains two classes for integration with JFace Viewers:

  • RichTextCellLabelProvider
  • RichTextCellEditor
Using these classes it is possible to edit and render HTML formatted text in a JFace Viewer.

Note that in embedded mode, the RichTextEditor is resizable and movable via drag operations.



There is also a NatTable integration available.



QUICK START: Look at the Snippets. Other snippets are available on git.

File a bug: Click here to file a bug or feature request for RichText


Back to the top