How to integrate Fonto Editor with a CMS

Fonto Editor requires an external content repository to provide permanent storage of documents. This chapter describes the steps to take to integrate the editor in your environment. There are three different ways of integrating the editor with a Content Management System or Cloud storage. Each of these approaches enable the integration of the editor for different environments and systems.

Methods to connect with Fonto Editor

Fonto Editor standard CMS contracts

Using the Fonto Editor standard CMS contracts, Fonto Editor connects directly to the Content Management System. This is done by making HTTP requests to the editor specific endpoints which must be implemented in the Content Management System. The specific endpoint specifications can be found in the CMS connectors API documentation.

Fonto Editor iframe CMS Connector

The Fonto Editor iframe CMS connector is a wrapper around the Fonto Editor standard CMS contracts. Instead of sending HTTP requests to the Content Management System, it sends the same requests using HTML5 Web Messaging. This means all the requests are send to the parent window of the Fonto Editor instance, typically the editor is embedded in a (near) full body iframe. The parent frame can then in turn use, for example, native client side Content Management System methods for talking to the Content Management System.

When running Fonto Editor in an iframe, please make sure that this frame has focus when the editor loads. This will allow the editor to correctly respond to input and, if documents are loaded, place the cursor and allow users to start editing immediately. To focus the iframe, obtain a reference to its DOM element and call the focus method. For example:



Choosing the right method of connecting

Different methods have different requirements. Choose which fits your use-case best based on the following statements:

Fonto Editor standard CMS contracts

Fonto Editor iFrame CMS Connector

Need to implement additional Fonto Editor specific endpoints other then the endpoints defined by the Fonto Editor standard CMS contracts

Cannot host additional server applications

Cannot host Fonto Editor on the CMS domain

Cannot implement new HTTP endpoints in the CMS

Only have client side methods for accessing the CMS in the form of a JavaScript API

Production grade integration