Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created January 28, 2021 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/2d4773547b17fd1ee33f821190e5949c to your computer and use it in GitHub Desktop.
Save bjoerntx/2d4773547b17fd1ee33f821190e5949c to your computer and use it in GitHub Desktop.
var script = document.createElement('script');
script.onload = function () {
TXDocumentViewer.init( {
containerID: m_containerID,
viewerSettings: {
toolbarDocked: true,
dock: "Fill",
userNames: m_userNames,
isSelectionActivated: m_isSelectionActivated,
showThumbnailPane: m_showThumbnailPane,
basePath: m_serviceURL + "/documentviewer",
oauthSettings: {
accessToken: m_accessToken
}
}
});
};
getAccessToken(function(token) {
m_accessToken = token;
script.src = m_serviceURL +
"/documentviewer/textcontrol/GetResource?Resource=minimized.tx-viewer.min.js&access_token=" +
m_accessToken;
document.head.appendChild(script);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment