PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
Modifies the style of the selected elements in an HTML Editor control.
Example
HTMLEditorFormatSelection(HTMEDT_MyHTMLEditor, htmlItalic)
HTMLEditorFormatSelection(HTMEDT_MyHTMLEditor, htmlFontSize, "14px")
Syntax
HTMLEditorFormatSelection(<HTML Editor control> , <Attribute> [, <Value>])
<HTML Editor control>: Control name
Name of the HTML Editor control used.
<Attribute>: Integer constant
Style attribute to modify:
htmlAlignmentAligns the selection horizontally. If this constant is used, the <Value> parameter can be used to specify the desired alignment. The possible values are:
  • haCenter: The selection is centered.
  • haRight: The selection is aligned to the right.
  • haLeft: The selection is aligned to the left.
htmlStrikeThroughCrosses out the selection. If the selection is already crossed out, the line will be removed. If part of the selection is crossed out, the entire selection will be crossed out.
htmlColorChanges the color of the selection. If this constant is used, the <Value> parameter can be used to specify the desired color. The <Value> parameter can correspond to:
  • an integer. In that case, an RGB color (e.g., returned by RGB) will be used.
  • a string. In that case, a color in HTML format (e.g., "00ff00" or "green") will be used.
htmlBackgroundColorChanges the background color of the selection. If this constant is used, the <Value> parameter can be used to specify the desired background color. The <Value> parameter can correspond to:
  • an integer. In that case, an RGB color (e.g., returned by RGB) will be used.
  • a string. In that case, a color in HTML format (e.g., "00ff00" or "green") will be used.
htmlCreateLinkCreates a link to the URL specified in the <Value> parameter.
htmlSuperscriptApplies superscript formatting to the selection. If the superscript formatting has already been applied to the selection, it will be removed. If the superscript formatting has been applied to a part of the selection, it will then be applied to the entire selection.
htmlBoldMakes the selection bold. If the selection is already bold, the bold formatting will be removed. If part of the selection is bold, the whole selection will be set to bold.
htmlSubscriptApplies subscript formatting to the selection. If the subscript formatting has already been applied to the selection, it will be removed. If the subscript formatting has been applied to a part of the selection, it will then be applied to the entire selection
htmlItalicItalicizes the selection. If the selection is already italicized, the italic formatting will be removed. If part of the selection is italicized, the entire selection will be italicized.
htmlFontNameChanges the name of the font used for the selection. If this constant is used, the <Value> parameter can be used to specify the font family to use. For example: "Arial, Helvetica, sans-serif".
htmlNameCssStyleModifies the CSS style used by the selection. If this constant is used, the <Value> parameter can be used to specify the name of the CSS style to use.
htmlUnderlinedUnderlines the selection. If the selection is already underlined, the underline will be removed. If part of the selection is underlined, the entire selection will be underlined.
htmlDeleteLinkRemoves the link from the selection.
htmlFontSizeChanges the size of the font used in the selection. If this constant is used, the <Value> parameter can be used to specify the font size to use. This size is expressed in HTML units. For example: "12px" or "2.5em".
htmlFontSizeDecreaseReduces the font size of the selection.
htmlFontSizeIncreaseIncreases the font size of the selection.
<Value>: Optional variant
Value to be used depending on the constant used in the <Attribute> parameter.
Remarks
  • After using this function, the "Modify selection" event of the control is automatically executed (unless the function is used in this event).
  • The change is not immediate: the value of the control will be read again after the "Modify selection" event has been called.
Component: wd270obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment