Interface: PreviewAttachment
ghostly-runtime.PreviewAttachment
An object that holds metainfo and the attachment response. Returned by renderPreview.
Hierarchyβ
β³
PreviewAttachment
Propertiesβ
contentTypeβ
β’ contentType: string
The view's type (for instance, text/html or application/pdf).
Inherited fromβ
Defined inβ
ghostly-runtime/src/types.ts:73
dataβ
β’ data: GhostlyTypes
The unpacked response to the ghostlyFetch request. Will be null if the template returned nothing.
Defined inβ
ghostly-runtime/src/driver.ts:75
descriptionβ
β’ Optional description: string
An optional description of the attachment.
Inherited fromβ
Defined inβ
ghostly-runtime/src/types.ts:99
dpiβ
β’ Optional dpi: number
The resolution be used when rendering the view. Used for viewport size calculations.
Inherited fromβ
Defined inβ
ghostly-runtime/src/types.ts:79
htmlTransformsβ
β’ Optional htmlTransforms: HTMLTransform[]
An array of transformations to apply when producing HTML results. Defaults to [ 'inline', 'noscript',
'minimize' ].
Inherited fromβ
Defined inβ
ghostly-runtime/src/types.ts:90
nameβ
β’ name: string
The name of the attachment (including file extension).
Inherited fromβ
Defined inβ
ghostly-runtime/src/types.ts:96
paperSizeβ
β’ Optional paperSize: PaperSize
The paper size to be used when rendering documents.
Inherited fromβ
Defined inβ
ghostly-runtime/src/types.ts:82
paramsβ
β’ Optional params: unknown
Optional view params.
Inherited fromβ
Defined inβ
ghostly-runtime/src/types.ts:76
viewportSizeβ
β’ Optional viewportSize: ViewportSize
The size of the viewport to use, in pixels. Will be calculated from dpi and paperSize, if not provided.