GotoNodeEx Method (Article)

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:07

Description

Edits the text of the specified node in the specified mode.

Available in Ted and Fred.

Syntax

object.GotoNode objNode, bSrc, bOnly, bOpenMode

object

Required. Object name. Returned by Ted.GetActiveArticle.

objNode

Node to edit. It must be a node object returned by a function like GetCurNode.

bSrc

If true the text is edited in a source window, if false in the WYSIWYG window

bOnly

If true the command fails if the window required by the bSrc parameters is not available, if false and the required window type is not availabe the other type is used - e.g. if bSrc=false (i.e. request WYSIWYG editing) and bOnly=false and there is no WYSIWYG window the specified text is edited in a source window.

bOpenMode

0: use the same R/W access as article

1: R/O open

2: R/W open (if permitted).

Remarks

If the text is already being edited, GotoNodeEx just sets the focus to its editing window and position the cursor at the beginning of the node's text, otherwise it opens an editing window for the text and then sets the focus.

In other words, GotoNodeEx is like GotoTxtEx, except that it positions the cursor at the beginning of the node's text.  See also GotoTxtEx, GotoNode and GotoTxt.

Example

This script goes to the current node and opens it in read-write even if the article is read-only.

If Ted.HasActiveArticle Then

 dim objArticle = Ted.GetActiveArticle

 objArticle.GotoNode (objArticle.GetCurNode,True,False,2)

End If