Embed
Initialization

Initialization

Before using the Postnitro Embed functionality, you need to initialize the editor instance.

Module Initialization

const editor = createEditor({
    apiKey: "your-api-key",
});

Script Initialization

When using the script, the editor is available as a global variable:

const editor = window.postnitroEmbed.createEditor({
    apiKey: "your-api-key",
});

Replace your-api-key with your actual API key provided by Postnitro.

Default Headshot

You can set a default headshot for the editor by passing the defaultHeadshot option:

const editor = createEditor({
    apiKey,
    defaultHeadshot: {
        name: 'PostNitro.ai
        logo: 'https://postnitro.ai/embed/embed-loader.svg',
        handle: 'Create Carousels in seconds',
    }
});
 
Note: This will be used as the headshot for the new users who don't have a headshot set.