@filerobot/canva

Create your own design & customize it then upload it through the widget on the go.

Usage no npm install needed!

<script type="module">
  import filerobotCanva from 'https://cdn.skypack.dev/@filerobot/canva';
</script>

README

@filerobot/canva

Create your own design & customize it then upload it through the widget on the go by intergating this plugin inside Filerobot widget.

Usage

From NPM

The plugin is on NPM as @filerobot/canva

npm install --save @filerobot/canva

then

import Canva from '@filerobot/canva'
...
...
...
filerobot.use(Canva, optionsObject)

From CDN

The plugin from CDN is found inside Filerobot global object Filerobot.Canva

const Canva = window.Filerobot.Canva
...
...
...
filerobot.use(Canva, optionsObject)

Options

There are some few options for this plugin for helping in customization, as follow:

title: string

default: 'Canva (Design & Upload)'

The title/label that would be shown & used for the plugin.

apiKey: string

default: filerobot's canva api key

The API key used in initializing canva & creating the design through their SDK.

designType: 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

default: 'png

The type of the final created design's to be saved & uploaded with it.

companionHeaders: null | object | 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: object (optional)

default: locales from filerobot'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
  }
}