open-publication-preview

Type: Operation

Open the publication preview modal for the current or specified document

Opens a modal with an iframe showing a preview of the document generated by the CMS. This requires that the CMS implements the document/preview route to return a preview of the document in PDF or any other format that can be displayed in an iframe.

Label

Preview document

Icon

eye

Imported operation data

  1. [documentId]

    (Required)

    The Document ID of the document to preview, defaults to the current document

  2. [modalTitle]

    (Required)

    Type: String

    May be specified to override the title of the modal

  3. [modalIcon="eye"]

    (Required)

    Type: String

    May be specified to override the icon of the modal. This should be one of the Fontawesome (v4.7.0) icons. Do not include the fa- prefix, just use the icon names as-is from the documentation.

  4. [variant]

    (Required)

    Type: String

    May be specified to create multiple previews in accordance with the CMS. The CMS can create a different preview based on a value in this parameter. Eg: variant=blog-post and variant=product-sheet could generate different previews.