ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / HTML Editor functions
  • Properties specific to edtHTMLSelection variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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 function. This function is used to retrieve the current selection in an HTML Editor control.
  • WINDEV Selection property used on an HTML Editor control.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Griser ou non le bouton Ouvrir selon la sélection
HTMLEditorGetSelection(EDHTML_MonEditeurHTML, EditeurHTMLRécupèreSélection_Callback)
INTERNAL PROCEDURE EditeurHTMLRécupèreSélection_Callback(Sélection is edtHTMLSelection)
   	BTN_Ouvrir.Grisé = NOT Left(Sélection.Text, "https:\\" )
END
Properties

Properties specific to edtHTMLSelection variables

The following properties can be used to handle edtHTMLSelection variables:
Name Type 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 indexes 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.
Name Character string Name of CSS style.
Font
AlignmentInteger constantHorizontal alignment of the selection:
  • chCentre: Selection is centred.
  • chRight: Selection aligned to the right.
  • chLeft: Selection 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.
Name Character 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:
  • edthtmlSelVide: No selection made.
  • edthtmlSelSimple: A single HTML element is selected.
  • edthtmlSelMultiple: Several 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

Last update: 09/20/2024

Send a report | Local help