README
@filerobot/image-editor
The image editor plugin provides different functionality for editing the image available in the 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
From NPM
The plugin is on NPM as @filerobot/image-editor
npm install --save @filerobot/image-editor
then
import ImageEditor from '@filerobot/image-editor'
...
...
...
filerobot.use(ImageEditor, optionsObject)
From CDN
The plugin from CDN is found inside Filerobot
global object Filerobot.ImageEditor
const ImageEditor = window.Filerobot.ImageEditor
...
...
...
filerobot.use(ImageEditor, optionsObject)
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.
Options
(optional) id: string
default: 'ImageEditor'
An unique identifier for the plugin to be indentified between the other plugins through it.
(optional) locale: object
default: default locales inside lib/defaultLocale.js
.
Customizing some of the translations or the language's strings and replace the default locale.
(optional) forceOpenOnImgAddedToUpload
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 overriden internally with yourcontainer
property & SASS key generated throughsecurityTemplateID
property that are provided in @filerobot/core and cloudimageToken property's value would be the same ascontainer
unless you provided another value.