Full editor
data-variant=error
data-slots=header, text
IMPORTANT: Deprecation Warning
The createDesign and editDesign APIs allow you to embed the full editor component in your application.
The full editor component gives you access to three workflows:
- Launch with a blank canvas: createDesign()
- Launch with an image: createDesign()
- Launch with a project ID to continue editing an existing project: editDesign()
createDesign()
This method launches the full editor component either with a blank canvas, or with an image. The editor is loaded in an iframe. To open the editor with an image, you need to ensure that inputParams has an Asset object.
createDesign(CreateDesignParams)
CreateDesignParams
createDesign() takes a CreateDesignParams object with 4 properties.
CreateInputParams
CreateInputParams allows you to configure the editor to be launched for the user.
Example
ccEverywhere.createDesign(
{
modalParams: {},
callbacks: {
onCancel: () => {},
onError: (err) => {},
onLoadStart: () => {},
onLoad: () => {},
onPublishStart: () => {},
onPublish: (publishParams) => {},
},
outputParams: {
outputType: 'base64'
},
inputParams: {
canvasSize: '1:2',
templateType: 'Flyers',
}
}
);
editDesign()
This method launches a full editor component with an existing project. The project is loaded in an iframe.
editDesign(EditDesignParams)
EditDesignParams
editDesign() takes a EditDesignParams object with 4 properties.
EditInputParams
EditInputParams is where you pass the associated projectId to launch in an editor component.
Get projectId from publishParams of onPublish (called after save/download finishes).
Example
ccEverywhere.editDesign(
{
// inputParams.projectId is the only REQUIRED parameter
inputParams: {
projectId: CCX_PROJECT_ID
},
callbacks: {
onCancel: () => {},
onError: (err) => {},
onLoadStart: () => {},
onLoad: () => {},
onPublishStart: () => {},
onPublish: (publishParams) => {},
},
modalParams: {},
outputParams: {
outputType: 'base64'
},
}
);