PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV, WEBDEV and WINDEV Mobile 26 feature!
  • Properties specific to the description of edtHTMLSelection variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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. This function is used to retrieve the current selection in an HTML Editor control.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
// Gray out the "Open" button (or not) according to the selection
HTMLEditorGetSelection(HTMEDT_MyHTMLEditor, HTMLEditorGetSelection_Callback)
INTERNAL PROCEDURE HTMLEditorGetSelection_Callback(Selection is edtHTMLSelection)
  BTN_Open.Grayed = NOT Left(Selection.Text, "https:\\" )
END
Remarks

Properties specific to the description of edtHTMLSelection variables

The following properties can be used to handle edtHTMLSelection variables:
NameType usedEffect
StartIntegerFirst character selected in a "text without tags" unit (starts at 1).
EndIntegerLast character selected in a "text without tags" unit.
FragmentArrayArray of the selected HTML elements and start and end indices of the selection. The following properties can be used for each element:
htmlNodehtmlNodeHTML node in the selection.
StartIntegerIndex of the first character selected in htmlNode.
EndIntegerIndex of the last character selected in htmlNode.
HTMLCharacter stringValue of the entire node with HTML tags.
TextCharacter stringValue of the entire node without HTML tags. To get this fragment, use the Middle function with the Start and End properties.
HTMLCharacter stringValue of the selection in HTML format.
StyleStyle of the selection.
NameCharacter string Name of CSS style.
Font
AlignmentInteger constantHorizontal 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.
StrikeOutBoolean
  • True if the selection is struck through,
  • False otherwise.
ColorInteger constantFont color.
BackgroundColorInteger constantBackground color of the selection.
SuperscriptBoolean
  • True if the selection is in superscript mode,
  • False otherwise.
BoldBoolean
  • True if the selection is bold,
  • False otherwise.
SubscriptBoolean
  • True if the selection is in subscript mode,
  • False otherwise.
ItalicBoolean
  • True if the selection is in italics,
  • False otherwise.
NameCharacter stringName of the font family used for selection.
BackgroundColorOpacityIntegerPercentage of background color opacity.
UnderlineBoolean
  • True if the selection is underlined,
  • False otherwise.
SizeIntegerFont size of the selection.
TextCharacter stringValue of the selection without HTML tags.
TypeInteger constantType of the selection:
  • edthtmlSelEmpty: No selection is performed.
  • edthtmlSelSingle: Only one HTML element is selected.
  • edthtmlSelMultiple: Multiple HTML elements are selected.
URLCharacter stringIf a link is selected, URL of that link.
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment