Toolbar edit mode
Question asked by M.A. Beets - 10/31/2024 at 3:42 AM
Answered
Hi,

How can I disable/hide the Editor mode in the vertical toolbar?

In DeniedPermissions I cannot find any property that does the trick

Cem Alacayir Replied
Employee Post Marked As Answer
ViewAnnotationsAbility to view and edit annotations of the document.


documentViewer.DeniedPermissions = DocumentViewerPermissions.ViewAnnotations;
M.A. Beets Replied
That worked wel in previous version and still in current version but the side effect is that the  hyperlinks in the document are not working anymore
Cem Alacayir Replied
Employee Post
Ok maybe we should separate view and edit permissions in the next version.
M.A. Beets Replied
For now, I have wrote a workaround with javascript on ClientEvents.Downloading
<script>
	function clientEventDownloading(sender, e) {
		var iframe = document.getElementById('documentViewer-frame');
		var style = document.createElement('style');
		style.textContent =
			"#editorModeButtons { display: none !important; } " +
			"#editorModeButtons + .verticalToolbarSeparator { display: none !important; }";

		iframe.contentDocument.head.appendChild(style);
	}
</script>

Reply to Thread

Enter the verification text