Contents
- Index
- Previous
- Next
ToggleBold method
Declaration
function ToggleBold(UseCurrentWord: Boolean = True): Boolean;
Description
Toggles the bold state of the selected text.
If the optional parameter UseCurrentWord is True (the default) then, if nothing is selected but the insertion point is within a word, the method treats the current word as the selection.
The method places <STRONG> and </STRONG> tags around the selection or at the insertion point. If the selection is already formatted bold, the <STRONG> and </STRONG> tags are removed. If the selection is within a larger string of bold text, the method inserts </STRONG> and <STRONG> tags around the selection, effectively turning bold off for the selection.
Returns True on success. Returns False if the selection is an element (such as a control or table) that does not support bold formatting.