open-document-preview-modal

Type: Operation

Opens the document preview modal.

This operation opens a modal showing a preview of the given document. The document should already be loaded. It can optionally highlight a node in the previewed document. This is usually used to indicate the target of a reference.

The modal can also optionally show an 'edit reference' link. This is intended for cases where the modal is used to display the target of a reference, where the link provides a convenient way for users to edit that reference. To use this feature, pass both the editReferenceNodeId and editReferenceOperationName properties. Note that the link is automatically hidden if the node corresponding to the editReferenceNodeId is not editable.

Imported operation data

  1. documentId

    (Required)

    The document id of the node to preview

  2. modalIcon

    (Required)

    Type: String

    (Optional) The icon to show at the top 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.

  3. modalTitle

    (Required)

    Type: String

    (Optional) The title being shown at the top of the modal. Defaults to t__Select a link.

  4. nodeId

    (Required)

    Type: NodeId

    The node which should be highlighted.

  5. editReferenceNodeId

    (Required)

    Type: NodeId

    (Optional) The ID of the referencing node for which an 'edit reference' link should be shown.

  6. editReferenceOperationName

    (Required)

    Type: String

    (Optional) The name of the operation that should be invoked when the 'edit reference' link is clicked.