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.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
Methods
-
_setPreviewerElementHeight()
-
Sets the height of the previewer element using functions provided by calling the setHeight function provided by the HeightMixin module.
-
constructor(args)
-
Parameters:
Name Type Description args
object[] -
display()
-
By default does nothing.
-
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.
-
report()
-
Tests if the plugin can be used in the users browser.
-
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.