Upgrade from 7.12 to 7.13

For the full release notes, head over to Fonto Editor 7.13.0.

A number of APIs will be removed in the 7.14 release. They are listed on the Upgrade from 7.13 to 7.14 page.

Required changes

In Fonto Editor 7.13 we changed some of our behavior in regards to managing focus. This causes the editor to no longer aggressively steal the focus from the host page. As a side effect this causes the editor to no longer be automatically focused when loaded into an iframe. Adding window.focus() in the CMS code will enable the focus on the Fonto Editor frame and scroll the cursor to the previously expected position.

New remote document states

The remote document states in Fonto Editor are simplified. In the 7.12 version of the editor, some states could not always be expressed which caused unexpected behavior like documents that kept on trying to save indefinitely.

We changed the following:

  • We added the outOfSyncReason property which can be used to determine why a document is out of sync. We now consistently handle the 403 and 404 responses on various document-related endpoints by setting the document out of sync with an appropriate OutOfSyncReason.

  • The hasSaveError and the hasLockError properties on RemoteDocumentState are now only set when the save or lock respectively fail in a way that may be fixed over time. These are the 400 status code (unsaveable content) for the PUT /document endpoint and for both endpoints, the 500 status code (CMS internal error) and connection errors. For the 404 and 403 status codes, the error is considered permanent and the document turns read-only. For unsaveable content, the hasUnsaveableContentErrorproperty will also be set to true.

  • The hasPermanentSaveError property is retained for backwards compatibility.

  • The type property on RemoteDocumentState is retained for backwards compatibility. It is not extended to cover any new states, we encourage you to use the properties on the state object instead. This type property will be deprecated in the future.

Please refer to our documentation on Remote document states for more information, including a flowchart that describes how the editor responds to the various states.

Table widget menu operation lists

Some properties in TableDefinitionProperties are deprecated and they will be removed in 7.16.

  • horizontalAlignmentOperationNames

  • verticalAlignmentOperationNames

  • columnBorderOperationNames

  • rowBorderOperationNames

  • tableBorderOperationNames

Instead of them, two new properties are introduced and the previous operation names in the old API are moved to the new API:

  • columnWidgetMenuOperations

  • rowWidgetMenuOperations

If you have your own fork of fontoxml-table-flow-basic, fontoxml-table-flow-cals, fontoxml-table-flow-tei or fontoxml-table-flow-xhtml, then please rebase it to use new properties.

The deprecation, the new properties and the new configuration options in configureAs*TableElements functions allow you to be able to configure your own table widget menu operations.

Calling externalDataManager.setExternalData

Calling this method while rendering is in progress was previously allowed, but could cause unexpected behavior and corruption of Fonto Editor's internal state, as the object or custom widget being rendered could be invalidated while it was still being rendered. We've now added a clear error if this is attempted. Please check every call to externalDataManager.setExternalData in your editor and ensure that it does not happen during rendering. Please refer to the new page on dealing with this error for more details as well as potential solutions and work-arounds.

Check automatic numbering using reducers

We have made some changes to the behavior of the reducer to prevent unexpected results.

If you are using automatic number of nodes which uses the addReducer API, please check to see if your numbering is still working as you expect. Your numbering should be unaffected. However there can be some edge cases which could change it.

If your numbering behaves differently, we advice you to update your configuration to work with the new behavior. For this you will likely have to change your selector since we changed the moment the DOM of a hierarchy node is checked.

Recommended changes

Empty rows and spanning cells handling in XHTML tables

We've fixed two bugs in our XHTML table definition.

If you have your own fork of fontoxml-table-flow-xhtml, then please rebase it to incorporate these fixes.

Firstly, all empty rows were treated as header rows even if they were preceded by body rows. These are now properly recognized as also being body rows.

Secondly, Fonto Editor was always expanding tables when a row has row spanning cells even if the next row has no place for the spanning cells. However XHTML table specifications only allow tables to expand at the bottom of the table. That's why we introduced the new property supportsRowSpanningCellsAtBottom in TableDefinitionProperties and set to true in XhtmlTableDefinition.