Can we set the Customizing Toolbars and Overlay Elements to Readonly mode In webviewer(JS)?

Product:
@pdftron/webviewer”:

Product Version:
“^8.1.0”

Please give a brief summary of your issue:
(Think of this as an email subject)
Can we set the Customizing Toolbars and Overlay Elements to Readonly mode In webviewer(JS) ?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

As of now we have disableElements,enableElements as follow.

const wvElement = document.getElementById(‘viewer’);
WebViewer({ …options }, wvElement).then(() => {
// remove left panel and left panel button from the DOM
instance.UI.disableElements([ ‘leftPanel’, ‘leftPanelButton’ ]);
// re-enable left panel and left panel button from the DOM
instance.UI.enableElements([ ‘leftPanel’, ‘leftPanelButton’ ]);
});

Can we set the Customizing Toolbars and Overlay Elements to Readonly mode without disabling it ?

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi,

There’s currently no API for that. But you can just do it by modifying the elements on the DOM. For example, for the ‘leftPanelButton’, you can just do:

$('[data-element=leftPanelButton]').disabled = true;

Wanbo