UI Component which renders a responsive, auto-resizing preview of a file. Transforms the output from $core_v2_ui.GetPreViewHtml() when passed a value of true for AdjustToContainer, which returns a <span class="ui-previewhtml"></span> stub. Dynamically requests a server-side rendeirng of a file viewer's preview for a URL scaled to the available space on the client-side, optionally configured to specific requested widths and heights. Re-requests new renderings on browser resize or orientationchange.
It is typically not necessary to use this component directly, opting instead to render viewers in the Widget API with $core_v2_ui.GetPreViewHtml() with the AdjustToContainer option set to true.
// Request a preview of the file in the maximum available width, 750px, as defined by the component's parent.
<div class="parent" style="width: 750px">
<div class="ui-previewhtml" data-url=""/file/to/view.jpg"></div>
Powered by Zimbra