|
|
|
|
- Properties specific to edtHTMLSelection variables
edtHTMLSelection (Type of variable) In french: edtHTMLSélection
The edtHTMLSelection type is used to identify all the advanced characteristics of a selection in an HTML Editor control. The characteristics of this selection are returned by several WLanguage properties. edtHTMLSelection variables are used in the following cases: - "Modify selection" event associated with the HTML Editor control.
- HTMLEditorGetSelection function. This function is used to retrieve the current selection in an HTML Editor control.
Selection property used on an HTML Editor control.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. // Gray out the "Open" button (or not) according to the selection HTMLEditorGetSelection(HTMEDT_MyHTMLEditor, HTMLEditorGetSelection_Callback) INTERNAL PROCÉDURE HTMLEditorGetSelection_Callback(Selection is edtHTMLSélection)  BTN_Open.Grayed = NOT Left(Selection.Text, "https:\\") END
Remarks Properties specific to edtHTMLSelection variables The following properties can be used to handle edtHTMLSelection variables: | | | | | Name | | | Type used | Effect |
---|
Start | | | Integer | First character selected in a "text without tags" unit (starts at 1). | End | | | Integer | Last character selected in a "text without tags" unit. | Fragment | | | Array | Array of the selected HTML elements and start and end indices of the selection. The following properties can be used for each element: | | htmlNode | | htmlNode | HTML node in the selection. | | Start | | Integer | Index of the first character selected in htmlNode. | | End | | Integer | Index of the last character selected in htmlNode. | | HTML | | Character string | Value of the entire node with HTML tags. | | Text | | Character string | Value of the entire node without HTML tags. To get this fragment, use the Middle function with the Start and End properties. | HTML | | | Character string | Value of the selection in HTML format. | Style | | | | Style of the selection. | | Name | | Character string | Name of CSS style. | | Font | | | | | | Alignment | Integer constant | Horizontal alignment of the selection: - haCenter: The selection is centered.
- haRight: The selection is aligned to the right.
- haLeft: The selection is aligned to the left.
| | | StrikeOut | Boolean | - True if the selection is struck through,
- False otherwise.
| | | Color | Integer constant | Font color. | | | BackgroundColor | Integer constant | Background color of the selection. | | | Superscript | Boolean | - True if the selection is in superscript mode,
- False otherwise.
| | | Bold | Boolean | - True if the selection is bold,
- False otherwise.
| | | Subscript | Boolean | - True if the selection is in subscript mode,
- False otherwise.
| | | Italic | Boolean | - True if the selection is in italics,
- False otherwise.
| | | Name | Character string | Name of the font family used for selection. | | | BackgroundColorOpacity | Integer | Percentage of background color opacity. | | | Underline | Boolean | - True if the selection is underlined,
- False otherwise.
| | | Size | Integer | Font size of the selection. | Text | | | Character string | Value of the selection without HTML tags. | Type | | | Integer constant | Type of the selection: - edthtmlSelEmpty: No selection is performed.
- edthtmlSelSingle: Only one HTML element is selected.
- edthtmlSelMultiple: Multiple HTML elements are selected.
| URL | | | Character string | If a link is selected, URL of that link. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|