1
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

4 Replies

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


documentViewer.DeniedPermissions = DocumentViewerPermissions.ViewAnnotations;
0
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
1
Cem Alacayir Replied
Employee Post
Ok maybe we should separate view and edit permissions in the next version.
0
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