Fonto Connectors integration

This add-on provides the necessary wiring for integrating the Fonto editor in a Fonto Connectors deployment.

It detects if Fonto Editor is launched without an initial document in which case the user is presented with a modal which allows browsing of the underlying storage or the option to create a new document. It also provides operations that can be used to provide a File menu with options to load or create a new document, closing the current document.

Futhermore this package provides the save-and-close operation used by the Connectors page to close the Fonto editor using the iframe communication API.

Installation instructions

  • Add a dependency on fontoxml-integration-connectors in your editor's config/fonto-manifest.json.

  • (Recommended) Add the following configuration to your config/configuration.js:

    configurationManager.set('document-title-element-xpath', '{XPATH_TO_THE_TITLE_ELEMENT_OF_YOUR_DOCUMENT}');

    Where {XPATH_TO_THE_TITLE_ELEMENT_OF_YOUR_DOCUMENT} is an XPath that should resolve to an element. Upon creation of a new document the child content of that element is set to the text provided as the title of the new file.

  • (Recommended) Add the ConnectorsFileDropButton to your masthead:

    		<ConnectorsFileDropButton />
    		<FxOperationButton label="" operationName="undo" type="masthead" />
    		<FxOperationButton label="" operationName="redo" type="masthead" />
  • Build & deploy!

APIs in fontoxml-integration-connectors

Was this page helpful?