Description
Display dialog to select and insert an existing text at the specified position in the article.
Available in Ted and Fred.
Syntax
object.InsTxtDlg (nIdx, nBasketId, nReferenceBasketId, strBaseQuery |
object
Required. Object name. Returned by Ted.GetActiveArticle.
nIdx
Insert position of the text, ranging from 0 = before the first element in the article to NTxts = after the last element in the article.
If this parameter is negative the user is prompted to select the insertion position amongst all the valid ones for the text's type. To get the idx of the current element, use GetCurTxtIdx.
nBasketId
The initial basket for the text selection dialog - if 0 the initial basket is the last used one.
nReferenceBasketId
Id of the initial basket for the referenced object selection dialog - if it is 0 the dialog starts in the same basket of the last selected object of the same kind (picture or multi-media or URL). If it is -1, will insert a photo element not referencing a picture.
strBaseQuery
The base query name
Remarks
The user is prompted to choose the text to insert with a text selection dialog displaying name and type of the texts. Only texts of the type(s) allowed in the insertion position in the article are listed (and can be selected) in the dialog. If there are no allowed types at the insertion position the function fails immediately with an error message. The candidates are all texts which are stored in the selected basket, are neither spiked nor black, are not part of any article, and have allowed types for the given article.
If the type of the text being inserted requires a referenced object (i.e. a picture, multi-media or URL element) the user is also prompted to choose it using a standard object selection dialog. Note that in such a case when selecting a picture it is also possible to create a new dummy one.
The nReferenceBasketId can be also negative, thus not prompting to select the referenced picture or multi-media object when inserting article elements that reference pictures or multi-media.
Context
Article object
See also
InsChildNode, InsNewTxt, InsNodeAtCur, InsObj, InsObjDlg, InsTxt.