Module: alfresco/preview/AlfDocumentPreviewPlugin

alfresco/preview/AlfDocumentPreviewPlugin

This is the base module should be extended by all plugins for the document previewer. This provides basic height calculations for the preview (which can be overridden if required). The display function should be overridden to implement the preview behaviour.
Author:
  • Dave Draper
License:
Source:

Methods

_setPreviewerElementHeight()

Sets the height of the previewer element using functions provided by calling the setHeight function provided by the HeightMixin module.
Source:

constructor(args)

Parameters:
Name Type Description
args object[]
Source:

display()

By default does nothing.
Source:

onMarkupAdded()

If display returns HTML to be added as the preview then this function will be called after it has been added to the document. This provides an opportunity for the plugin to perform any additional initialisation.
Since:
  • 1.0.51
Source:

onRecalculatePreviewLayout()

Handler for window resize event. This will call [_setPreviewerElementHeight] module:alfresco/preview/AlfDocumentPreviewPlugin#_setPreviewerElementHeight but can be extended or overridden to perform additional preview layout actions.
Source:

report()

Tests if the plugin can be used in the users browser.
Source:

setAttributes(attributes)

Updates the attributes with the values from the AlfDocumentPreview instance for the current Node being previewed.
Parameters:
Name Type Description
attributes object[] The attributes object to mixin into the default settings.
Source: