Integrate with a CMS

This page describes scenarios and concerns when integrating Fonto Review into your own CMS.

The general Integrate with a CMS page in the Fonto Editor documentation is also applicable for Fonto Review. Please read that as well.

Annotation storage

Fonto Review requires the CMS to store annotations. We don't really have hard requirements on the type of storage you choose. You can use any existing database system as you'd like. We do recommend a system that can reproduce certain data that's needed in the /review/state endpoint fast. That endpoint is periodically called to enable collaboration.

Interacting with documents

Fonto Review stores annotations keyed on a document. Within that document, Fonto Review stores targets of annotations keyed on a document revision. When a document save occurs, Fonto Review will automatically update the targets of the annotations to reflect their new positions in that document revision.

Server side filtering

Fonto Review requires a server-side filter component in the CMS it connects to. The review/state call sends a request with the current active filter form values. The CMS is expected to filter out annotations that do not match the filter.

Fonto's development CMS does not provide any of this filter logic by default (it will always return all annotations), since it is very specific to a data model. A filter for the development CMS can be specified the configureDevCms.js file in the dev-cms directory of Fonto Editor.

The following is an example configureDevCms.js file:



'use strict';
const matchAnnotationToCurrentFilter = require('../<PATH TO YOUR FILTER FUNCTION>');
module.exports = (router, config) => {
    return {
        reviewAnnotationFilter: matchAnnotationToCurrentFilter
        // The key below might be defined if the development CMS routes have been customized.
        // routes: myCustomRoutes