farling42 / fvtt-pdf-pager

PDF Pager for Foundry
MIT License
6 stars 4 forks source link

Allow drop of PDF page to create @PDF link #6

Closed farling42 closed 1 year ago

farling42 commented 1 year ago

Intercept a drop of a JournalEntryPage that contains a PDF to create a @PDF link instead of the usual @UUID link.

The created link should be like @PDF[${codeOrName}|page=1]{${pdfData.name}}

farling42 commented 1 year ago

Possiblywrapping TextEditor::getContentLink to intercept JournalEntryPage with a type of 'pdf'

Perhaps require holding down ALT, CTRL or SHIFT when dragging to trigger this.

farling42 commented 1 year ago

JournalEntryPage.prototype.link() creates the actual string.

farling42 commented 1 year ago

When #9 is implemented, prefer to use the CODE (if defined) rather than the NAME in the link.

farling42 commented 1 year ago

Implemented in V0.9.0