==== Controller for RichText ====
The RichTextController is build around the [[https://www.eclipse.org/nebula/widgets/richtext/richtext.php|Nebula RichText project]] which contains 2 controls:
* RichTextViewer for rendering HTML formatted text.
* RichTextEditor for editing HTML formatted text.
This is a FieldController that means that it can be linked to the databinding service.
Currently, the **Nebula RichText project** is a recent project and does not seem completely finalized. For example, we do not know haw to correctly manage scrolling operation in
RichTextViewer control.
==== Control ====
{{:controllers:rich_text_viewer.png?350 |RichTextViewer control}}
RichTextController is a controller build around a RichTextViewer control.\\
* It proposes a button to expand or edit the field by opening a window containing a RichTextEditor control.
* When all of the text could not be displayed, an Image Label is displayed:
\\
{{:controllers:rich_text_editor.png?450 |RichTextEditor control}}
When clicking on Edit button in the RichTextController,
a new window is opened around a RichTextEditor control which offer a way to edit text.
\\
==== Usage: ====
== Code ==
getComposite().setEnabled(null != getEntity());
getComposite().setEnabled(null != getEntity());
getControl().setData("ONE_TO_ONE", #ENTITY_MM(adi://myproject/model.film/FilmMM).getLazyFieldMap().get("filmText"));
== Overview ==
{{:controllers:filmtext_detail.png |RichText - Store description field as String}}
\\
== Explanations ==
^ ** layoutData="sg bottom"**:|description richtext control and image imageViewer control have same size.|
^ ** noLabel**:|No label are affected to control description. By default, when a field control is linked to a model field (here property="description"), a label control is automatically created.|