How can I change the PrizmDoc Viewer so that the TextSelection tool is selected by default instead of the Pan tool?
In order to select the TextSelection tool by default in PrizmDoc Viewer there are a few things you need to take into account. First, you have to click the button inside the embedViewer()
function found in the index page of the sample. Second, the button for the text selection tool is actually disabled initially, so in order to be able to click it, the button has to be enabled first by removing the pcc-disabled
class.
Use the following code to do this:
function embedViewer(options) {
var viewer = $('#viewer1').pccViewer(options);
viewer.viewerControl.on(PCCViewer.EventType.ViewerReady, function(viewer) {
$("[data-pcc-mouse-tool=\"AccusoftSelectText\"]").removeClass('pcc-disabled');
$("[data-pcc-mouse-tool=\"AccusoftSelectText\"]").click();
});
}
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article