LinksLink

A link to a placed file.

Static Properties

Name Description
AFTER_ATTRIBUTE_CHANGED = "afterAttributeChanged" string Dispatched when the value of a property changes on this Link. This event bubbles. This event is not cancelable.
AFTER_DELETE = "afterDelete" string Dispatched after a Link is deleted. This event bubbles. This event is not cancelable.
AFTER_EMBED = "afterEmbed" string Dispatched after a Link is embedded. This event bubbles. This event is not cancelable.
AFTER_MOVE = "afterMove" string Dispatched after a Link is relocated from one object to another. This event bubbles. This event is not cancelable.
AFTER_NEW = "afterNew" string Dispatched after a Link is created. This event bubbles. This event is not cancelable.
AFTER_UNEMBED = "afterUnembed" string Dispatched after a Link is unembedded. This event bubbles. This event is not cancelable.
AFTER_UPDATE = "afterUpdate" string Dispatched after a Link is updated. This event bubbles. This event is not cancelable.
BEFORE_DELETE = "beforeDelete" string Dispatched before a Link is deleted. This event bubbles. This event is cancelable.
BEFORE_EMBED = "beforeEmbed" string Dispatched before a Link is embedded. This event bubbles. This event is cancelable.
BEFORE_MOVE = "beforeMove" string Dispatched before a Link is relocated from one object to another. This event bubbles. This event is cancelable.
BEFORE_UNEMBED = "beforeUnembed" string Dispatched before a Link is unembedded. This event bubbles. This event is cancelable.
BEFORE_UPDATE = "beforeUpdate" string Dispatched before a Link is updated. This event bubbles. This event is cancelable.

Instance Properties

Name Description Access
assetID string The asset ID of the linked object. read-only
assetURL string The asset URL of the linked object. read-only
date Date The date and time the Link was created. read-only
edited bool If true, indicates the linked object has been edited in the current document but the source file has not been updated. read-only
editingState EditingState The Version Cue editing state of the file. read-only
eventListeners EventListeners A collection of event listeners. read-only
events Events A collection of events. read-only
filePath string The file path (colon delimited on the Mac OS). Can also accept: File. read-only
id number The unique ID of the Link. read-only
index number The index of the link in the links collection. read-only
isValid bool Returns true if the object specifier resolves to valid objects. read-only
label string A property that can be set to any string. read-write
linkResourceURI string The URI of the linked resource. read-only
linkType string The file type of the linked object. read-only
linkXmp LinkMetadata XMP data for the link source file. read-only
links Links A collection of links. read-only
name string The name of the Link. read-only
needed bool If true, indicates a link to a full-resolution version of the source file is needed. If false, indicates the object is embedded. read-only
parent The linked object. Can return: Story, Graphic, Movie or Sound. read-only
preferences Preferences A collection of preferences objects. read-only
properties Object A property that allows setting of several properties at the same time. read-write
renditionData LinkResourceRenditionType The rendition data of the link resource. read-only
size number The size of the Link file. read-only
status LinkStatus The status of the link. read-only
versionState VersionState The Version Cue version state of the file. read-only

Methods

addEventListener(
eventType, handler ​[, captures])
 → EventListener
checkIn(
[versionComments] ​[, forceSave])
copyLink(
to ​[, versionComments] ​[, forceSave])
extractLabel(
key)
 → string
getElements(
)
 → Link
insertLabel(
key, value)
reinitLink(
linkResourceURI)
relink(
to)
relinkTextFragmentLink(
linkResourceURI ​[, name])
removeEventListener(
eventType, handler ​[, captures])
 → bool
show(
)
toSource(
)
 → string
toSpecifier(
)
 → string
unembed(
[to] ​[, versionComments] ​[, forceSave])
unlink(
)
update(
)
 → Link
addEventListener(
eventType, handler ​[, captures=false])
 → EventListener
Adds an event listener.
eventType string The event type.
handler The event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
checkIn(
[versionComments] ​[, forceSave=false])
Check in to Version Cue.
versionComments string The comment for this version (Optional)
forceSave bool Forcibly save a version (Optional)
copyLink(
to ​[, versionComments] ​[, forceSave=false])
Copies the link file to the specified location.
to File The file or folder to which to copy the file.
versionComments string The comment for this version. (Optional)
forceSave bool If true, forcibly saves a version. (Optional)
editOriginal(
)
Opens the source file of the link in the default editor for the source file type.
extractLabel(
key)
 → string
Gets the label value associated with the specified key.
key string The key.
getElements(
)
 → Link
Resolves the object specifier, creating an array of object references.
goToSource(
)
Opens the source file of the link in InDesign for SharedContent links.
insertLabel(
key, value)
Sets the label to the value associated with the specified key.
key string The key.
value string The value.
reinitLink(
linkResourceURI)
Experimental: Reinitialize the link to a new uri
linkResourceURI string Resource URI to relink.
relink(
to)
Points the link to a new source file.
to The full path name of the new source file. Can accept: File or String.
relinkTextFragmentLink(
linkResourceURI ​[, name])
Experimental: Relink the text fragment link to a new uri
linkResourceURI string Resource URI to relink to.
name string The tag name for the key. (Optional)
removeEventListener(
eventType, handler ​[, captures=false])
 → bool
Removes the event listener.
eventType string The registered event type.
handler The registered event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
replaceWithOriginal(
)
Experimental: Download the original asset and replace FPO with it.
revealInBridge(
)
Opens Adobe Bridge and selects the source file of the link.
revealInSystem(
)
Opens the file system to the folder that contains the source file of the link, and selects the file.
show(
)
Selects the link.
toSource(
)
 → string
Generates a string which, if executed, will return the Link.
toSpecifier(
)
 → string
Retrieves the object specifier.
unembed(
[to] ​[, versionComments] ​[, forceSave=false])
Unembeds the source file. If no folder is specified, creates a link to the original source file; if a folder is specified, copies the file to the folder and creates a link to the copied file.
to File The folder to which to copy the unembedded file. (Optional)
versionComments string The comment for this version. (Optional)
forceSave bool If true, forcibly saves a version. (Optional)
unlink(
)
Embeds the source file in the document.
update(
)
 → Link
Updates the link if the source file has been changed.