Remote document states
The Fonto editor edits documents that are loaded from the CMS. The state of a document in the CMS can change while it is being edited in the Fonto Editor. A document may get locked, it may get removed, and many more things can happen. Also, the connection with the CMS itself may temporarily drop out. This concept page describes how the Fonto Editor reacts to changes of the remote document state and how you can add new UI to reflect the remote document state.
The remote document state is a state tracked by the Fonto editor. This is tracked for every loaded document. There are four CMS endpoints which responses can change the remote document state. These are:
These endpoints can all affect one or more properties of the Remote
The following flowchart can help you determine whether a document will be editable and how the UI responds to a new remote document state.
Remote document state flowchart
Some responses from different endpoints have the same result. For example, a 404 or a 403 response from one of the endpoints will make the document uneditable, represented by the inaccessible state in the flowchart. The
is property will turn to false and the
out will be set to
The 412 response is only valid for the save / lock endpoints. A 412 response indicates that the information in the editor lags behind to the information in the CMS. This will result in a out of sync document. When a 412 response is returned, make sure that either the revisionId or the lockState is changed.
A common place to visualize any custom states a document can have is the Sheetframe header. Please use the flowchart above when configuring a custom sheetframe header to ensure all the applicable 'default' states are still visualized correctly.