New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@rotsen/vue-filerobot-image-editor

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rotsen/vue-filerobot-image-editor

Filerobot-image-editor from vuejs

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

Filerobot Image Editor

Requirements

  • Vue.js >= 2

Install

CDN

<script src="https://unpkg.com/@rotsen/vue-filerobot-image-editor"></script>

NPM

$ npm install @rotsen/vue-filerobot-image-editor --save
or 
$ yarn @rotsen/vue-filerobot-image-editor

Filerobot Image Editor

Component

Then in your component:

<template>
  <div>
    <img
      v-if="!openEditor"
      width="300"
      :src="src"
      @click="openEditor = true"
      alt="example image"
    />
    <button  @click="openEditor = true"> edit</button>
    <VueFilerobotImageEditor
      v-if="openEditor"
      :config="config"
      :src="src"
      @complete="onComplete"
      @beforeComplete="onBeforeComplete"
      @close="onClose"
      @error="onError"
    />
</template>

<script>
import VueFilerobotImageEditor from "@rotsen/vue-filerobot-image-editor";

export default {
  components: { VueFilerobotImageEditor },
  data() {
    return {
      openEditor: false,
      config: {
        tools: ['adjust', 'effects', 'filters', 'rotate', 'crop', 'resize', 'watermark', 'shapes', 'image', 'text'],
        finishButtonLabel:'Save',
      }
       
      src: "https://scaleflex.airstore.io/demo/stephen-walker-unsplash.jpg",
      colorScheme: 'light' //  'dark'|'light'
    };
  },
  methods: {
   onComplete(url, file) {
      console.log("url" + url);
    },
    onBeforeComplete(element) {
      if (element && element.canvas) {
        this.src = element.canvas.toDataURL();
      }
    },
    onClose(status) {
      console.log("close" + JSON.stringify(status, null, 3));
      this.openEditor = false;
    },
     onError(error) {
      console.log(" error " + error);
    },
    

  }
};
</script>

Props

NameTypeDescription
configObjectAll configuration of FilerobotImage Editor. Default: {}
src StringImage url to edit . Required

Events

NameDescription
closeFired when the editor is close
errorFired when error occurs
beforeCompleteEvent fired when click to Save of Download
completeEvent fired when a dialog definition at the end of beforeComplete

Docs

Full docs at  [filerobot-image-editor](https://github.com/scaleflex/filerobot-image-editor)

Build Setup

You can use vue-cli or other vue templates

Created By

Thanks to contributers

License

MIT

Keywords

Vue

FAQs

Package last updated on 23 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts