Recent searches

in

What is the Visual Editor API?

Last modified: August 11th, 2026

On this page

An Application Programming Interface (API) is a set of methods and rules that allow one piece of software to interact with another using code rather than a graphical interface. APIs call specific functions to read data, trigger actions, or respond to events. You can use CloudCannon's public Visual Editor API to read and write content, listen for changes, and build custom integrations in the Visual Editor, all from code running inside your website files.

The Visual Editor API is designed for experienced CloudCannon developers who want to build their own custom integrations for the Visual Editor that go beyond what CloudCannon provides out of the box. If you need help using the API or with your CloudCannon setup in general, please contact our friendly support team. For a complete list of API objects and methods, please read our reference documentation on the Visual Editor API.

How does the Visual Editor API work?#

A screenshot of the Visual Editor shows a webpage preview with a Data Panel of inputs open over it.

When you open a page in the Visual Editor, CloudCannon loads your site inside a sandboxed iframe. The Visual Editor API bridges communication between your website's JavaScript and the Visual Editor that surrounds it.

CloudCannon exposes an API router on window.CloudCannonAPI. You request the version you want with useVersion(), and the router returns an API Object you can use to interact with the Visual Editor.

What can you do with the Visual Editor API?#

The Visual Editor API provides methods to:

At CloudCannon, we use this API to build our own features. CloudCannon's Editable Regions are built on the same Visual Editor API that you have access to. For example, *.createTextEditableRegion() is the method that powers the data-editable attribute. It makes any HTML element inline-editable and connects it to the Visual Editor's content model.

For more information on how to use the Visual Editor API, please read our documentation on initializing the Visual Editor API, or the Build custom Visual Editor integrations guide.

Related Resources

Open in a new tab