ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control
  • Overview
  • Initializing a Rich Text Area control
  • Modifying one or more elements in a Rich Text Area control
  • Retrieving the value of a Rich Text Area control
  • Properties specific to the management of a Rich Text Area control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Handling a Rich Text Area control through programming
Overview
To handle a Rich Text Area control programmatically, use the variable of the Rich Text Area control directly in the code.
The variable of the Rich Text Area control corresponds to the name of the control.
Initializing a Rich Text Area control
To initialize a Rich Text Area control, you can:
  • initialize the control with the HTML code. This allows you to format the control content through programming.
    For example:
    // Modify the Rich Text Area
    RTA_MODIFIABLE = "'''This section was " + ...
    "modified'''"
  • use Value or CaptionHTML.

Modifying one or more elements in a Rich Text Area control

A Rich Text Area control can contain links or images. To modify the information regarding a link or an image found in the control, all you have to do is handle the requested element through programming.
For example, a Rich Text Area control contains a link and an image. The caption and the URL of the link change, depending on whether the Web user is connected or not. Similarly, the image displayed is different. In this case, all you have to do is directly handle the Link and Image controls.
// Modify the link and the image found in the RTA_Home control
IF bConnected = True THEN
LINK_Connection.Caption = "Disconnect"
LINK_Connection.URL = "www.mysite.fr"
IMG_Logo = "User_Logo.gif"
ELSE
LINK_Connection.Caption = "Connect"
LINK_Connection.URL = "www.mysite.fr\Login.htm"
IMG_Logo = "Logo.gif"
END
Retrieving the value of a Rich Text Area control
To retrieve the content of a Rich Text Area control:
  • perform a simple assignment. For example:
    CurrentContent = RTA_Overview
  • handle the Rich Text Area control directly. For example:
    Trace(RTA_Overview)
  • use the Value or CaptionHTML properties.
Remark: The retrieved text corresponds to the HTML code of the control.
Properties specific to the management of a Rich Text Area control
The following properties are used to manage the characteristics of a Rich Text Area control through programming:
CaptionHTMLThe CaptionHTML property is used to handle the text of a control as HTML code.
For a complete list of WLanguage properties that can be used with a Rich Text Area control, see Properties associated with a Rich Text Area control.
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help