Choose your preferred SSG:
Choose your preferred SSG:

Disable CloudCannon window global in the Visual Editor

CloudCannon injects an object onto the window object when viewed in the Visual Editor. This article will show how to turn off this behaviour. This is helpful if you are using anther global variable called CloudCannon.

To turn this off, we need to capture the cloudcannon:load event and call the disableGlobalInstall function.

document.addEventListener('cloudcannon:load', function (e) {
  const { CloudCannon } = e.details;
Was this article helpful? or Suggest an improvement >

Related articles