@scaleflex/widget-canva
v4.8.11
Published
Create your own design & customize it then upload it through the widget on the go.
Downloads
242
Keywords
Readme
@scaleflex/widget-canva
Create your own design & customize it then upload it on the go by integrating this plugin inside Scaleflex Media Asset Widget.
Usage
NPM
npm install --save @scaleflex/widget-canvaYARN
yarn add @scaleflex/widget-canvathen
import Canva from '@scaleflex/widget-canva'
...
...
...
scaleflexWidget.use(Canva, propertiesObject)CDN
The plugin from CDN is found inside Scaleflex global object Scaleflex.Canva
const Canva = window.ScaleflexWidget.Canva
...
...
...
scaleflexWidget.use(Canva, propertiesObject)Properties
title
Type: string.
Default: 'Canva (Design & Upload)'
The title/label that would be shown & used for the plugin.
apiKey
Type: string.
Default: 'scaleflexWidget's canva api key'
The API key used in initializing canva & creating the design through their SDK.
designType
Type: string.
Default: 'A4Document'
The design type of the design workspace that would be opened to create the design, visit Canva's design types for all available types.
fileType: string
Type: string.
Default: 'png'
The type of the final created design's to be saved & uploaded with it.
companionHeaders
Type: null | object.
Default: null
If you need to pass additonal headers in companion requests then pass them in this property (used in retrieving the metadata of the design file).
locale
Type: object.
Default: locales from scaleflexWidget's backend then default locale file with all labels is under lib/defaultLocale.js.
You can override some labels by specifying a translation object here, such as:
{
strings: {
canvaPluginTitle: 'Canva (Design & upload)' // overrides the default Standard portraits value to standard verticals
}
}