Extension method for jQuery that opens ImageVault and lets the user select one or multiple media assets.

To open ImageVault, select an iframe using jQuery and invoke the imageVaultInsertMedia function and supply it with a configuration that atleast contains:

If you would like a specific format, specify it by suppliying a formatId. If not, the user will be prompted with a popup where she can select from the available user formats.

If media should be edited (cropped or resized) before insert, then specify insertMode = 1.

To edit existing media in an editor, use mediaUrl and set it to the url of the media to edit. This will open the editor when ImageVault opens.

If you would like to get public urls (that don't need authentication), supply publishDetails.text and/or publishDetails.url and enter where the media is to be used.

The close function can also come in handy if you run the script in a popup to know when to close it.

The success function is called with a InsertSuccessMessageEvent which has a response property that contains a InsertResponse that describes the media that the user selected.

Example:

<script type="text/javascript" src="/scripts/jquery-3.1.1.js"></script>
<script type="text/javascript" src="/scripts/imagevault-insert-media/scripts/insertmedia.min.js"></script>

<script type="text/javascript">
$("#insertMedia").imageVaultInsertMedia({
imageVaultUiUrl:"https://myiv.com",
uiLang:"en",
publishingSource:"https://mysite.com",
success:function(result){
alert(result.response.Id);
}
});
</script>
<iframe id="insertMedia"></iframe>

You can test the different config parameters to test the function.

Index

Classes

Interfaces

Generated using TypeDoc