@filerobot/image-editor
![CodeSandbox][codeSandbox-image]
The image editor plugin provides different functionality for editing the image available in Filerobot Media Asset Widget, gives you the possibility to add watermark, text, shapes, edit image by filters, orientations...etc.
It is required in case you need to have edit image, variants, exporting functionalities.
Usage
NPM
npm install --save @filerobot/image-editor
Yarn
yarn add @filerobot/image-editor
then
import ImageEditor from '@filerobot/image-editor'
...
...
...
filerobot.use(ImageEditor, propertiesObject)
CDN
The plugin from CDN is found inside Filerobot global object Filerobot.ImageEditor
const ImageEditor = window.Filerobot.ImageEditor
...
...
...
filerobot.use(ImageEditor, propertiesObject)
Plugin's styles
import '@filerobot/core/dist/style.css'
import '@filerobot/image-editor/dist/style.css'
or if you prefer the minified version
import '@filerobot/core/dist/style.min.css'
import '@filerobot/image-editor/dist/style.min.css'
The plugin's css file should be imported after the Core's css file for having the styles shown correctly.
Properties
locale
Type: object.
Default: default locales inside lib/defaultLocale.js.
Customizing some of the translations or the language's strings and replace the default locale.
forceOpenOnImgAddedToUpload
Type: boolean.
Default: false
Automatically open the image editor on adding a single image in upload panel. (Note: Upload panel must contain only 1 image).
Check the rest of the options available on filerobot-image-editor
Note: filerobot object property, would be overridden internally with your container property & SASS key generated through securityTemplateId property that are provided in @filerobot/core and cloudimage.token property's value would be the same as container unless you provided another value.