User Guide
220
GetTagAtCursor
function GetTagAtCursor(wbSelect: WordBool): WideString;
Returns the tag in which the cursor is currently located in the editor. If a tag cannot be
identified, the method returns an empty string.
If wbSelect is True, the tag will be selected (highlighted) in the document.
Example:
// Displays a message box with the current tag
function Main() {
with (Application) {
MessageBox(ActiveDocument.GetTagAtCursor(false), 'Current
Tag At Cursor', 0);
}
}
GotoNextEndTag
function GotoNextEndTag(wbSelect: WordBool): WordBool
Moves the next end tag, selecting it if
wbSelect is True. Returns False if no tag found.
GotoNextStartTag
function GotoNextStartTag(wbSelect: WordBool): WordBool
Moves the next starting tag, selecting it if
wbSelect is True. Returns False if no tag
found.
GotoPreviousEndTag
function GotoPreviousEndTag(wbSelect: WordBool): WordBool
Moves the previous end tag, selecting it if wbSelect is True. Returns False if no tag
found.
GotoPreviousStartTag
function GotoPreviousStartTag(wbSelect: WordBool): WordBool
Moves the previous starting tag, selecting it if
wbSelect is True. Returns False if no tag
found.
Indent
procedure Indent()
Indents the current selection.
InsertTag
procedure InsertTag(sStartTag, sEndTag: OleVariant; wbOverwriteSelection: WordBool)
Inserts the passed tag pair at the current cursor position, overwriting the selection if
wbOverwriteSelection is True. The cursor will be positioned between the start and
end tags after this operation, and if
wbOverwriteSelection is False, the current
selection will be surrounded by the tags.