This is a bunch of tips and techniques related to Oracle PL/SQL and Forms.
Purpose
Here is a PJC that allows doing some basic operations on a Text Item.
You can apply styles on the selected sub-text and also view the HTML result in a browser window.
It is a "light" component that does not render the HTML result itself, but has the benefit to stay a simple PJC (no Java Bean).

A popup menu is attached to both single and multi-line Text Items.
Select a part of the text, then right-click to display the popup menu.
The Java code
EmbededTextField.java EmbededTextArea.java
The implementation class of the PJCs
oracle.forms.fd.EmbedeTextField for a single-line Text Item
oracle.forms.fd.EmbedeTextArea for a multi-line Text Item
The methods you can set
Set_Custom_Property( 'BL.BEAN', 1, 'CASE', 'case' ) ;
Where case can b:
Set_Custom_Property( 'BL.BEAN', 1, 'STYLE', 'style' ) ;
Where style can b:
The methods you can call
char := Get_Custom_Property( 'BL.BEAN', 1, 'GET_CARET_POSITION' ) ;
The first position is zero (0).
char := Get_Custom_Property( 'BL.BEAN', 1, 'GET_RANGE_SELECTION' ) ;
that returns a comma delimited string : start_position,end_position
The first position is zero (0).
The sample dialog
. Download the embededtext.zip file
. Unzip the file
. copy the embededtext.jar file in the <ORACLE_HOME>/forms/java directory
. Edit your /forms/server/formsweb.cfg file to add this jar file
. Open the embedtext.fmb module (Oracle Forms 9.0.2)
. Compile all and run the module