Util
forceSync
This call will sync the document state of every collaborator in the session to the same value.
Nominally syncing isn’t something you should have to think about when using Codox, however there are some scenarios where you may need to explicitly sync and this is where forceSync
could be useful.
One scenario where you might need to use forceSync
is if your content management backend supports a versioning system, and front-end users may ‘revert’ to previous versions from the user-interface. To ensure that other collaborators also revert to the same document version, you should invoke forceSync
with the version’s document state as the input. An example flow might look like this: