Upcoming Deprecations 7.14
A number of obsolete APIs of Fonto Editor will be removed in the 7.14 release, which has a planned release date of March 2021. This page describes how to move on to a replacement API. We expect this to not take longer than two days (16hrs), at most. All instructions in this list should be followed before the 7.14 release.
Most of the APIs have already been deprecated in past releases so it is possible that some of these changes have already been applied to your editor.
The instructions are grouped by their area and then sorted by difficulty.
Obsolete and unused react props
The following props or usages of props in Fonto components are deprecated:
-
The prop
truncated
of the Breadcrumbs component does not have to be set. It is safe to remove its usage.Item Width -
The prop
is
of the FontoFull Color Logo component will be removed. It has been obsolete since the new Fonto logo we introduced in the 7.5 release. It is safe to remove its usage. -
The prop
only
of the FUpdate State Again After Ms XOperation Button will be removed. It is safe to remove its usage.
Unused FD S constants
-
The truncated
Breadcrumb Item Link Width and the truncated Breadcrumb Item Button Width imports are unused. They can safely be removed.
Unused CV K properties
-
The show
When property for configure As Sheet Frame will no longer have any effect. It is safe to remove it.
Renames
The following renames have taken place in recent Fonto versions. Currently, they still work because the old name is aliased to the new one, but this will be removed in the 7.15 release.
Operations
-
The unload-dita-document operation is the same as the unload-document operation.
-
Replace all occurrences of the old unload-dita-document operation with the new unload-document operation.
-
-
The open-ui-pane operation has been replaced with the open-sidebar-tab operation.
-
The toggle-ui-pane operation has been replaced with the toggle-sidebar-tab operation.
Files
The following files have had their extension changed:
-
use
XPath.jsx has its extension changed to use XPath.js. -
use
Remote Document State.jsx has its extension changed to use Remote Document State.js.
The following files have been moved to a different directory:
-
The file add
Drag And Drop Operation.js was moved to the directory fontoxml-structure
. -
The file Structure
View.jsx was moved to the directory fontoxml-structure
. -
The file get
Closest Structure View Item.js was moved to the directory fontoxml-structure
. -
For all of these files, simply change the
fontoxml-structure-view
part of the import tofontoxml-structure
. -
The file configure
Structure View Item Properties.js was moved to the directory fontoxml-families
. -
The file configure
As Structure View Item.js was moved to the directory fontoxml-families
. -
For all of these files, simply change the
fontoxml-structure-view
part of the import tofontoxml-families
.
Configuration variables
The following configuration variables have changed:
The configuration value maximum-number-of-find-results is now included in the find-and-replace-configuration.
The configuration value wiris-initialization-parameters is now called wiris-mathtype-initialization-parameters.
The scope property wiris
was replaced with the wiris-mathtype-script-url configuration variable.
Connectors
In the 7.8 release, we have changed how connectors work. If you use the old way of configuring connectors, please follow the Upgrade Instructions from 7.7 to 7.8 to upgrade your custom connectors if you have not already done so.
Image families
In the past, all of these families (configure
JavaScript
// Before:
configureAsImage(sxModule, 'self::img', 'image', 'href');
// After:
configureAsImage(sxModule, 'self::img', 'image', {referenceQuery: '@href', isPermanentId: true});
Widgets
Label Query Widget
A number of widgets are obsolete with the introduction of the Label
We are aware of a known issue in Fonto Editor 7.12.0 where the deprecation warning for create
If you see the message "create
JavaScript
// Before
createAttributeLabelWidget('title')
// After:
createLabelQueryWidget('@title', { inline: true })
JavaScript
// Before
createAttributeLabelWidget('title', {
prefix: '[',
suffix: ']',
defaultValue: '(no title)'
})
// After:
createLabelQueryWidget('(@title, "(no title)")[1]', {
inline: true,
prefixQuery: '"["',
suffixQuery: '"]"'
})
JavaScript
// Before
createBulletingWidget('-')
// After:
createLabelQueryWidget('"-"')
Related Nodes Query Widget
JavaScript
// Before
createRelatedNodesWidget('self::fn')
// After:
createRelatedNodesQueryWidget('descendant::fn => outermost()')
Overriding operations, actions and transforms
Overriding operations, actions and transforms trigger a warning. It will trigger an error starting from the 7.14 release. For every operation, action or transform that causes these errors, find out why the override happens and find a public API to do the same.
Rebasing forked table flow packages
The table implementations for .fontoxml-table-flow-cals, fontoxml-table-flow-xhtml, fontoxml-table-flow-tei and fontoxml-table-flow-basic are open source to allow others to fork them to make improvements. In recent releases, we have improved the performance of our versions a lot. Please rebase your local version. If you have made changes to your version, consider to pull-request them. If those changes are integrated, we will maintain those changes so that you can use the version that is supported by the platform.