How to get iframeCommunicationManager?
import iframeCommunicationManager from 'fontoxml-iframe-communication/src/iframeCommunicationManager.js'
Allows the application hosting a Fonto window to control the active Fonto instance and vice versa.
fontoxml-iframe-communication/iframeCommunicationManager from the Fonto application to communicate with the hosting application. Use the browser's native postMessage API to control the Fonto instance from the hosting application.
Messages posted to the Fonto window or iframe should have as their data a JSON-encoded object with at least a type property specifying the type of the message, as listed in the table below.
Execute an operation. The message data should contain the operationName to invoke, and data to pass to the operation. Only operations from a limited whitelist may be invoked from an external source. By default this list is empty. Set the iframe-communication-operations-whitelist configuration setting to an array of operation names to specify the whitelist.
Message To Parent
Post a custom command message to the parent window.
Tell the hosting application to close the Fonto instance. The hosting application is responsible for cleaning up auto-saves, releasing locks and closing the window or iframe. If
discardSaves is true, all saves of the current session should be discarded.
Toggle Full Screen
Tell the hosting application to resize the Fonto window or iframe between a full-screen view and one hosted in the CMS interface.