config
: (object
, optional). Configuration object for controlling single editor mode behavior
customMode
: (boolean
, optional). When true, SDK won’t automatically make HTML elements read-only for viewers. You need to handle this manually with the help of other APIs listed here. (default: false
)singleTabEditor
: (boolean
, optional). When enabled, restricts the editor to edit in only one browser tab at a time, preventing them from making changes across multiple tabs simultaneously (default: true
)5 seconds
.EditorAccessTimer
object:
state
('idle'
| 'inProgress'
| 'completed'
)durationLeft
(number
)<input>
<textarea>
<div>
null
: When the state is not available yet.undefined
: When there are no current editors available in single editor mode.UserEditorAccess
: When there is at least one editor available in single editor mode.
isEditor
(boolean
) - Whether the user is the editorisEditorOnCurrentTab
(boolean
) - Whether the user is editor on current tabUser
object:
email
(string
) - Editor’s emailname
(string
) - Editor’s namephotoUrl
(string
) - Editor’s photo URLuserId
(string
) - Editor’s unique IDnull
- User is not editor or request was canceledEditorRequest
object:
requestStatus
(string
) - ‘requested’ for active requestsrequestedBy
(User
) - User object of the requesternull
- Request is pendingtrue
- Request acceptedfalse
- Request rejectedCategory | Event Type | Description | Event Object |
---|---|---|---|
Editor | accessRequested | When a user requests editor access. Editor will get this event. | AccessRequestEvent |
Editor | accessRequestCanceled | When a user cancels their request for editor access. Editor will get this event. | AccessRequestEvent |
Viewer | accessAccepted | When a user’s request for editor access is accepted. Requesting Viewer will get this event. | AccessRequestEvent |
Viewer | accessRejected | When a user’s request for editor access is rejected. Requesting Viewer will get this event. | AccessRequestEvent |
Access Assignment | editorAssigned | When a user is assigned as the editor. | SEMEvent |
Access Assignment | viewerAssigned | When a user is assigned as a viewer. | SEMEvent |
Editor | editorOnDifferentTabDetected | When the editor opens the same document in a different browser tab. Editor will get this event. | SEMEvent |
singleTabEditor
to prevent confusion when users have multiple tabs open