Rich text editing

A textedit widget where the textFormat attribute is set to html can display a toolbox with classic editing actions (bold, italic, font size, and so on). Local actions are also created so you can create your own action views (global toolbar, and so on).


Rich text editing screenshot using GWC for HTML5

Figure 1. Rich Text Editing

You can use the showEditToolBox style attribute to show or hide the embedded toolbox. In this first example, the style is defined to show the embedded toolbox displayed above the textedit's text:
<Style name="TextEdit.htmlToolBox">
  <StyleAttribute name="textFormat" value="html" />
  <StyleAttribute name="showEditToolBox" value="true" />
</Style>
In this second example, the style does not use the embedded toolbox. Instead, local actions are created and bound to action views (such as toolbars or topmenus).
<Style name="TextEdit.htmlNoToolBox">
  <StyleAttribute name="textFormat" value="html" />
  <StyleAttribute name="showEditToolBox" value="false" />
</Style>
Tip: The behavior of the attribute showEditToolBox with the value auto differs between the Genero Desktop Client and the Genero Web Client. With the Genero Desktop client, 'auto' is interpreted as 'no'. With the Genero Web Client, 'auto' is interpreted as 'yes'.

How to migrate HTML generated by Rich Text editing in the Genero Desktop Client

If you have an application using the Genero Desktop Client, and that application created HTML using the Rich Text editing feature, the resulting HTML may include particularities that result in code that is not W3C compliant and therefore is not usable within the Genero Web Client.

A helper application has been provided that will translate the generated HTML file into an HTML5 file, allowing it to display correctly in both the Genero Desktop Client and the Genero Web Client. The application is located at $FGLDIR/demo/WebServices/richtextmigration. A README.txt file gives instruction for using the application.