jQuery.telligent.evolution.ui.components.viewhtml
UI Component which renders a file viewer responsively from the client side. Transforms the output from $core_v2_ui.GetViewHtml()
when passed a value of true
for AdjustToContainer
, which returns a <span class="ui-viewhtml"></span>
stub. Dynamically requests a server-side rendeirng of a file viewer 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.GetViewHtml()
with the AdjustToContainer
option set to true
.
Options
width
: (number) Optional width constraint. Otherwise, fills the available client side parent container.height
: (number) Optional height constraint. Otherwise, fills the available client side parent container.url
: (string) URL of file to viewpersisted
: (boolean) Whether the file viewer's output should be persisted
Example
// Request a rendering of the viewed file in the maximum available width, 750px, as defined by the component's parent.
<div class="parent" style="width: 750px">
<div class="ui-viewhtml" data-url=""/file/to/view.jpg"></div>
</div>