> ## Documentation Index
> Fetch the complete documentation index at: https://pitchprint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Designer ready method

> Hook custom code into the editor with window.ppDesignerInitialized, invoked by both the client and frame once the event bus is ready.

We have implemented an easy way of integrating your custom code to the editor using the the ppDesignerInitialized method which can be hooked to the global page. This method is invoked once the app has started and the event bus is ready for use.

```javascript theme={null}
window.ppDesignerInitialized = function(_class) {
	if (_class.name === 'client') {
		// this was invoked by the client
	} else if (_class.name === 'frame') {
		// this was invoked by the frame
	}
}
```

As explained in the section  [Events](/docs/api-reference/events), version 9 loads the app in an iFrame, which is created by a client class sitting on the parent page (your page). Both the frame and client gets to invoke your function if placed in the customJs section of your [settings page](https://admin.pitchprint.io/settings).

## Related articles

<CardGroup cols={2}>
  <Card title="Events" icon="bell" href="/docs/api-reference/events">
    Listen for and fire events on the PitchPrint client.
  </Card>

  <Card title="Initialization Options" icon="sliders" href="/docs/api-reference/initialization-options">
    All the options you can pass when creating a PitchPrint client instance.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.