Skip to content

makeLink

Jason Godesky edited this page Jul 17, 2026 · 1 revision

makeLink takes anything else that has a name and a uuid (like Actor, Item, JournalEntry, or JournalEntryPage documents) and returns a Foundry-style link string for that object.

Parameters

doc: (foundry.abstract.Named & Pick<foundry.abstract.Document, 'uuid'>) foundry.documents.TableResult

A document that you would like to get a link to.

Returns

A Foundry-style link string for that object.

Examples

import { makeLink } from '@revolutionarygamesco/common-foundryvtt'

makeLink({ name: 'John Doe', uuid: 'Actor.1111111111111111' }) // @UUID[Actor.1111111111111111]{John Doe}
makeLink({ name: 'Healing Potion', uuid: 'Item.2222222222222222' }) // @UUID[Item.2222222222222222]{Healing Potion}
makeLink({ name: 'Grappling Rules', uuid: 'JournalEntry.3333333333333333.JournalEntryPage.4444444444444444' }) // @UUID['JournalEntry.3333333333333333.JournalEntryPage.4444444444444444']{Grappling Rules}

Clone this wiki locally