Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Operator Uses Regular Expressions:
Operator Has Optional Arguments:
Operator [other Operator type actions]
Item [operators of similar scope]
Linking [other Linking operators]
success boolean
v11.7.0
11.7.0
As at baseline
createTextLink(sourceItem, destinationItem, regexAnchor [, linkTypeStr, guardStr])
New to v11.7.0, the createTextLink() operator can be used for text link creation. The arguments sourceItem and destinationItem must each be defined so as to identify a single (existing) item. The link's anchor text is defined by regexAnchor. This is a regular expression whose first match becomes the link anchor. Typically, regexAnchor will simply be a literal string of the anchor text.
There are two optional arguments:
- linkTypeStr allows the link type of the link to be set. If the specified link type does not already exist, it is created.
- guardStr is an action code expression for only used for Storyspace guard fields. Tinderbox does not evaluate nor display this field's code. Guard fields are not used/evaluated by Tinderbox and the guardStr's code can be viewed/edited only within the Storyspace app (using its Browse Links dialog).
Example of setting all the items (defined by title, path, ID, etc.) in $MyList to the same list number item in $MyList2 using the first instance of text 'See more' in $Text as the link's anchor text and setting the link type as 'explanation':
$MyList.each(anItem1){
$MyList2.each(anItem2){
createTextLink(anItem1,anItem2,"See more","explanation");
};
};