You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a document in read-only mode, editing controls remain visible and appear enabled, although they do not modify the document. This makes it difficult to tell which actions are available and gives the impression that the editor is malfunctioning.
Steps to reproduce
Open a document using /editor?src=<document-url>&readonly=1, or pass readonly: true through the iframe API.
Observe the editing toolbar.
Click an editing control: it appears available but has no effect.
Expected behavior
Read-only mode should clearly communicate that the document is being viewed:
Hide editing controls or visibly disable them.
Keep applicable viewing tools available, such as navigation, search and zoom.
Implementation context
In lib/onlyoffice-editor.ts, the editor is initialized with permissions.edit: true and editorConfig.mode: 'edit'. Read-only restrictions are then applied through asc_setRestriction(VIEW).
The comments in lib/onlyoffice/readonly.ts explain that this allows switching between read-only and editable modes without rebuilding the editor. However, the toolbar does not visually reflect the restriction.
Could read-only mode also update the interface accordingly? Using the native viewer mode when opening a read-only document, or consistently disabling editing controls while retaining runtime switching, would both address the issue.
Activity