Modify Content
Effortlessly modify the content of your templates in the Picsart Create Editor using dynamic variables and the replayUrl parameter.
The Picsart Create Editor provides the capability to modify the content of an open template using the replayUrl
parameter.
Tip
Not all the templates support content modification, only those that had been created to be dynamic, this means that previous knowledge of the available dynamic variables is required. Please take a look at the following example.
PicsartInstance.provideReplayEdits([
['title', text, 'New Title'],
['foregroundImage', result_image, 'https://cdn140.picsart.com/img1.png'],
['firstSticker', result_sticker, 'https://cdn140.picsart.com/img2.png'],
]);
PicsartInstance.open ({replayURL:'https://cdn140.picsart.com/template.zip' });
The provideReplayEdits
function can be executed before opening the editor. In the above example, text, an image, and a sticker are being replaced with new content.
The first value represents the ID of the content to be changed, the second parameter indicates the type of content to be modified, and the third parameter specifies the new content itself.
Dynamic types
Text
Name | Type | Description | example |
---|---|---|---|
text | String | Represents existing text in the template. | “New text” |
fill_color | String | Specifies a hexadecimal color that can be applied to text only. | “CBA5f1” |
font_size | Integer | The size of the font in pt. | 14 |
rotation | Integer | Rotation of the text in Deg. | 36 |
opacity | Integer | Opacity values from 0 to 100 | 100 |
Photos
Name | Type | Description | example |
---|---|---|---|
result_image | String | The URL to an image (png/jpg). The host must be whitelisted by Picsart. | 'https://cdn140.picsart.com/img.png’ |
Stickers
Name | Type | Description | example |
---|---|---|---|
result_sticker | String | The URL to an image (png/jpg or svg TBC). The host must be whitelisted by Picsart. | ‘https://cdn140.picsart.com/img2.png’ |
Updated 5 months ago