Giter Club home page Giter Club logo

toast-ui.vue-image-editor's Introduction

⚠️Notice: This repository is deprecated️️️️️

TOAST UI ImageEditor Vue Wrapper has been managed separately from the TOAST UI ImageEditor repository. As a result of the distribution of these issues, we decided to deprecate each wrapper repository and manage repository as a mono-repo from the TOAST UI ImageEditor repository.

From now on, please submit issues or contributing related to TOAST UI Vue Wrapper to TOAST UI ImageEditor repository. Thank you🙂.

Vue wrapper for TOAST UI Image Editor

This is Vue component wrapping TOAST UI Image Editor.

vue2 github version npm version license PRs welcome code with hearth by NHN

🚩 Table of Contents

Collect statistics on the use of open source

TOAST UI ImageEditor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI ImageEditor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the following usageStatistics option when creating the instance.

const options = {
    ...
    usageStatistics: false
}

const imageEditor = new tui.ImageEditor('#tui-image-editor-container', options);

Or, include tui-code-snippet(v1.4.0 or later) and then immediately write the options as follows:

tui.usageStatistics = false;

💾 Install

Using npm

npm install --save @toast-ui/vue-image-editor

If you install other packages, you may lose dependency on fabric. You need to reinstall the fabric.
npm install --no-save --no-optional fabric@~1.6.7

🔡 Usage

Load

  • Using namespace

    const ImageEditor = toastui.ImageEditor;
  • Using module

    // es modules
    import {ImageEditor} from '@toast-ui/vue-image-editor';
    
    // commonjs require
    const {ImageEditor} = require('@toast-ui/vue-image-editor');
  • Using <script>

    If you just add javascript file to your html, you use toastui-vue-image-editor.js downloaded. Insert toastui-vue-image-editor.js with vue in your html like this:

    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="path/to/toastui-vue-image-editor.js"></script>
  • Using only Vue wrapper component (Single File Component)

    toastui-vue-image-editor.js has all of the tui.ImageEditor. If you only need vue wrapper component, you can use @toast-ui/vue-image-editor/src/ImageEditor.vue like this:

    import ImageEditor from '@toast-ui/vue-image-editor/src/ImageEditor.vue'

Implement

First insert <tui-image-editor> in the template or html. includeUi and options props are required.

<tui-image-editor :include-ui="useDefaultUI" :options="options"></tui-image-editor>

Load ImageEditor component and then add it to the components in your component or Vue instance.

import {ImageEditor} from '@toast-ui/vue-image-editor';

export default {
    components: {
        'tui-image-editor': ImageEditor
    },
    data() {
        return {
            useDefaultUI: true,
            options: { // for tui-image-editor component's "options" prop
                cssMaxWidth: 700,
                cssMaxHeight: 500
            }
        };
    }
}

Props

You can use includeUi and options props. Example of each props is in the Getting Started.

  • includeUi

    Type Required Default
    Boolean X true

    This prop can contained the includeUI prop in the option. You can see the default UI.

  • options

    Type Required Default
    Object X { cssMaxWidth: 700, cssMaxHeight: 500 }

    You can configurate your image editor using options prop. For more information which properties can be set in options, see options of tui.image-editor.

Event

  • addText: The event when 'TEXT' drawing mode is enabled and click non-object area.
  • mousedown: The mouse down event with position x, y on canvas
  • objectActivated: The event when object is selected(aka activated).
  • objectMoved: The event when object is moved.
  • objectScaled: The event when scale factor is changed.
  • redoStackChanged: Redo stack changed event
  • textEditing: The event which starts to edit text object.
  • undoStackChanged: Undo stack changed event
<tui-image-editor ...
                  @addText="onAddText"
                  @objectMoved="onObjectMoved">
</tui-image-editor>
...
methods: {
    onAddText(pos) {
        ...
    },
    onObjectMoved(props) {
        ...
    }
}
...

For more information such as the parameters of each event, see event of tui.image-editor.

Method

For use method, first you need to assign ref attribute of element like this:

<tui-image-editor ref="tuiImageEditor" :options="options"></tui-image-editor>

After then you can use methods through this.$refs. We provide getRootElement and invoke methods.

  • getRootElement

    You can get root element of image editor using this method.

    this.$refs.tuiImageEditor.getRootElement();
  • invoke

    If you want to more manipulate the ImageEditor, you can use invoke method to call the method of tui.ImageEditor. First argument of invoke is name of the method and second argument is parameters of the method. To find out what kind of methods are available, see method of tui.ImageEditor.

    const drawingMode = this.$refs.tuiImageEditor.invoke('getDrawingMode');
    
    this.$refs.tuiImageEditor.invoke('loadImageFromURL', './sampleImage.png', 'My sample image');
    
    this.$refs.tuiImageEditor.invoke('startDrawingMode', 'FREE_DRAWING', {
        width: 10,
        color: 'rgba(255, 0, 0, 0.5)'
    });

🔧 Pull Request Steps

TOAST UI products are open source, so you can create a pull request(PR) after you fix issues. Run npm scripts and develop yourself with the following process.

Setup

Fork develop branch into your personal repository. Clone it to local computer. Install node modules. Before starting development, you should check to haveany errors.

$ git clone https://github.com/{your-personal-repo}/[[repo name]].git
$ cd [[repo name]]
$ npm install

Develop

Let's start development!

Pull Request

Before PR, check to test lastly and then check any errors. If it has no error, commit and then push it!

For more information on PR's step, please see links of Contributing section.

📙 Documents

💬 Contributing

📜 License

This software is licensed under the MIT © NHN.

toast-ui.vue-image-editor's People

Contributors

jinwoo-kim-nhn avatar jungeun-cho avatar junghwan-park avatar lja1018 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toast-ui.vue-image-editor's Issues

SVG icons are not displayed on the editor

Hi

I created a basic implementation of the TOAT UI using vuejs however I am facing an issue with the svg icons which are not displayed somehow.
I tried everything importing directly the icons on the header of HTML, using vuejs ... the icons are loaded by not displayed.

screenshot 2019-01-08 at 20 23 37

<template>
<div class="imageEditorApp">
    <tui-image-editor ref="tuiImageEditor"
                      :include-ui="useDefaultUI"
                      :options="options"
                      @addText="onAddText"
                      @objectMoved="onObjectMoved">
    </tui-image-editor>
</div></template>

<script>
// Load Style Code
import  "tui-code-snippet";
import  "fabric";
import  "tui-image-editor";
import { ImageEditor, whiteTheme } from "@toast-ui/vue-image-editor";
// To use the basic UI, the svg files for the icons is required.
import 'tui-image-editor/dist/svg/icon-a.svg';
import 'tui-image-editor/dist/svg/icon-b.svg';
import 'tui-image-editor/dist/svg/icon-c.svg';
import 'tui-image-editor/dist/svg/icon-d.svg';
import "tui-image-editor/dist/tui-image-editor.css";


export default {
  name: "KeyImageEditor",
  props: ["label", "required", "max", "type"],
  data: function() {
    return {
      useDefaultUI: true,
      options: {
        // for options prop
        selectionStyle: {
          cornerSize: 20,
          rotatingPointOffset: 70
        },
        includeUI: {
          theme: whiteTheme, // or whiteTheme
          menuBarPosition: "bottom",
          menu: [
            "crop",
            "flip",
            "rotate",
            "draw",
            "shape",
            "icon",
            "text",
            "mask",
            "filter"
          ],
          initMenu: "filter"
        }
      }
    };
  },
  computed: {},
  methods: {
    onAddText(pos) {},
    onObjectMoved(props) {}},
  watch: {},
  components: {
    "tui-image-editor": ImageEditor
  }
};
</script>

Documentation on achieving mobile UI with wrapper?

Version

3.3.0

Development Environment

MacOS 10.14.1 (18B75)
Chrome Version 70.0.3538.110 (Official Build) (64-bit)

Current Behavior

I see no reference to a "mobile" UI. Please provide insights into achieving a succinct mobile UI

Expected Behavior

Mobile-compatible UI

Range/Slider not working on mobile

Range/Slider not working on mobile

Version

3.12.0

Development Environment

Chrome, IOS, Android devices.

Current Behavior

Cannot using touch or drag on Range/Slider to change value.

Expected Behavior

Working well on mobile same as pc/desktop

how to set the initializeImgUrl in vue Cli

Version

"@toast-ui/vue-image-editor": "^1.0.2"

Development Environment

windows/chrome

Current Behavior

when i use loadImageFromURL
i want to change the initializeImgUrl,
but
can't use imageEditor.ui.initializeImgUrl in vue cli

Expected Behavior

want to know how to get this or set

Block redirect on "Download"

Hi, Instead of Downloading the file ( opening in a new tab into the browser) i just need to URL.
When I hit save i dont want to be redirect in a blank page. I've tried different methods:
storeEditorImg: function() { this.src = this.$refs.tuiImageEditor.invoke('toDataURL'); return false; },

or

storeEditorImg: function(event) { this.src = this.$refs.tuiImageEditor.invoke('toDataURL'); event.preventDefault(); },

add bindings for brush width, text style, etc.

It would be great if the component allows to directly bind to properties like textStyle, Brush, etc.
Right now I need to have my own event handlers to call setTextStyle or setBrush when the users changes any of those.
With the direct binding of the properties the whole thing would integrate a lot better into vue.

Polygon Icon Hover State Problem

I changed all icons' hover colors, but it doesn't work for poligon icon. It uses this:

<use xlink:href="/images/icon-a.svg?1f2f3ed047d2f26b5fdaae448ed70c56#icon-a-ic-icon-polygon" class="active"></use>

As you can see it's grabbing the icon from icon-a set, but the others from icon-c.
In the main app, this issue had been solved at version 3.9.0.

method "loadImageFromURL" not callback

Current Behavior

Loading image error, but not callback reject

//  my code
    this.$refs.tuiImageEditor.invoke('loadImageFromURL', this.img, 'checker_image').then((result, error) => {
      this.$emit('cancel_loading')
      console.log('loadImageFromURL',result,error)
    }).catch((e) => {
      console.log('load iamge error',e)      // not call
      this.$emit('cancel_loading')
    });

In tui-image-editor.js

{
	        key: '_setBackgroundImage',
	        value: function _setBackgroundImage(img) {
	            var _this3 = this;

	            if (!img) {
	                return _promise2.default.reject(rejectMessages.loadImage);
	            }

	            return new _promise2.default(function (resolve, reject) {
	                var canvas = _this3.getCanvas();

	                canvas.setBackgroundImage(img, function () {
	                    var oImage = canvas.backgroundImage;

	                    if (oImage.getElement()) {     // when the oImage is null, it won't go down, no resolve and reject
	                        resolve(oImage);
	                    } else {
	                        reject(rejectMessages.loadingImageFailed);
	                    }
	                }, imageOption);
	            });
	        }

Expected Behavior

Add condition in _setBackgroundImage

{
	        key: '_setBackgroundImage',
	        value: function _setBackgroundImage(img) {
	            var _this3 = this;

	            if (!img) {
	                return _promise2.default.reject(rejectMessages.loadImage);
	            }

	            return new _promise2.default(function (resolve, reject) {
	                var canvas = _this3.getCanvas();

	                canvas.setBackgroundImage(img, function () {
	                    var oImage = canvas.backgroundImage;

	                    if (oImage && oImage.getElement()) {     //  add variable condition
	                        resolve(oImage);
	                    } else {
	                        reject(rejectMessages.loadingImageFailed);
	                    }
	                }, imageOption);
	            });
	        }

Uncaught (in promise) The executing command state is locked.

this.$refs.tuiImageEditor.invoke('loadImageFromURL', 'hn0fqc.jpg', 'My sample image');
error:
Uncaught (in promise) The executing command state is locked.

Version

Development Environment

Current Behavior

// Write example code

Expected Behavior

Add @load feature

    mounted() {
        let options = editorDefaultOptions;
        if (this.includeUi) {
            options = Object.assign(includeUIOptions, this.options);
        }
        this.editorInstance = new ImageEditor(this.$refs.tuiImageEditor, options);
        this.addEventListener();
        this.$emit('load', this.editorInstance) // add emit 
    },

need to check the instance loaded, $refs is not reliable

How can I load image of toast-ui.vue-image-editor from toDataURL() string ?

Version

"@toast-ui/vue-image-editor": "^1.0.2"

Development Environment

Chrome Version 76.0, Windows 10

Current Behavior

Not able to create toast-ui.vue-image-editor items from toDataURL() string

const uiElements = this.$refs.tuiImageEditor.invoke('toDataURL')

// This uiElements returns the string as something like this data:image/png;base64,iVBORw0KGgoAAAANS...

Expected Behavior

I want to know the method to convert the string to again toast-ui.vue-image-editor image
and load image again in the toast-ui.vue-image-editor for editing.
What is the method or way to do this?

Hi @junghwan-park and @jinwoo-kim-nhn
Is there any possibility to do this?

Need larger resizing handles on added objects.

##Version
3.3.0

##Development Environment
MacOS 10.14.1 (18B75)
Chrome Version 70.0.3538.110 (Official Build) (64-bit)

Current Behavior

I'm sure there is a way to adjust it, but when adding new objects on mobile, the resizing handles are tiny.

Expected Behavior

Larger resizing handles.

File size is being increased to 13Mb without any change.

The orginal filesize is : 400Kbs

but after

      var file = this.$refs.tuiImageEditor.invoke("toDataURL", {
        format: "jpeg"
      })

if no format is given the filesize gets to 13MB for PNG
and 5MB for jpeg.
(If edited or not.)

What Am I missing? how I can maintain the image size to least?

it should not increase way more than the actual size?

this is how I have started the editor

      <tui-image-editor
        ref="tuiImageEditor"
        :include-ui="useDefaultUI"
        :options="options"
        @redoStackChanged="redoStackChanged"
        @undoStackChanged="undoStackChanged"
        @addText="addText"
      />

and options are as

    return {
      useDefaultUI: false,
      options: {
        cssMaxWidth: "100%",
        cssMaxHeight: "100%",
        usageStatistics: false,
        selectionStyle: {
          cornerSize: 50,
          rotatingPointOffset: 70
        }

All UI-Components appear left aligned

Version

toast-ui.vue-image-editor 1.0.2

"@toast-ui/vue-image-editor": "^1.0.2",
"axios": "^0.18.1",
"moment": "^2.24.0",
"vue": "^2.6.6",
"vue-router": "^3.0.1",
"vuetify": "^1.5.5",
"vuex": "^3.1.0"

Development Environment

windows 10 - 64 , chrome

when the page with the editor opens it looks like this:
error

All elements are on the left side of the screen

<template>
    <v-container class="imageEditorApp">
        <tui-image-editor :include-ui="useDefaultUI" :options="options"></tui-image-editor>
    </v-container>
</template>

<script>

import { ImageEditor } from '@toast-ui/vue-image-editor';

export default {
    components: {
        'tui-image-editor': ImageEditor
    },
    data() {
        return {
            useDefaultUI: true,
            options: { // for tui-image-editor component's "options" prop
                usageStatistics: false,
                cssMaxWidth: 700,
                cssMaxHeight: 500,
                menuBarPosition: 'bottom'
            }
        };
    }
}

</script>

When textstyle fill is set to the actual one, the whole style gets reset

Version

3.14.3

Current Behavior

When you set the text style of a textobject to the same fill color it already has, the color and other styles will be reset.
For whatever reason that doesn't happen when you set the text size to the same again.
Following line in tui-image-editor.js is responsible for it:

          if (activeObj[key] === val && key !== 'fontSize') {
            styleObj[key] = resetStyles[key] || '';
          }

Expected Behavior

When you set the text fill color to the same as already is set nothing should change at all.

vuecli2不显示svg

Version

Development Environment

Current Behavior

// Write example code

Expected Behavior

Prevent user to move and resize objects

Version

@toast-ui/[email protected]
[email protected]

Development Environment

Mozilla/5.0 (Linux; Android 8.1.0; Redmi 5 Plus Build/OPM1.171019.019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/73.0.3683.90 Mobile Safari/537.36

Current Behavior

The user can move and scale objects on screen

Expected Behavior

I don't want allow the user move and scale objects

I'm making and app with vue and cordova for the user paint some images, and that plugin worked as well, but after draw on screen, the user can scale and move the paint objecs, i want to prevent that option
I tried to use the objectMoved and objectScaled events and put a 'return false' in the end but didn't worked.

Thanks for the support :)

Color palette doesn't show

Hi,
The color palette in free drawing doesn't appear or small size
I dont know how to reproduce the issue
Screenshot_2019-11-07_12-13-47

How to change the default theme of toast ui image editor?

Version

"@toast-ui/vue-image-editor": "^1.0.2"

Development Environment

Chrome Version 76.0, Windows 10

Current Behavior

The Default theme is in black color

<div id="app" class="imageEditorApp ml-5">
    <image-editor ref="tuiImageEditor" id="tuiImageEditorUI"
          v-if="options.includeUI.loadImage.path"
          :include-ui="useDefaultUI"
          :options="options"
      ></image-editor>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.3.2/fabric.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui-color-picker/v2.2.3/tui-color-picker.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script>
<script>
import 'tui-image-editor/dist/tui-image-editor.css';
import ImageEditor from '@toast-ui/vue-image-editor/src/ImageEditor.vue'
export default {
  name: 'ToastUI',
  components: {
    'image-editor': ImageEditor
  },
  data () {
    const icona = require('tui-image-editor/dist/svg/icon-a.svg')
    const iconb = require('tui-image-editor/dist/svg/icon-b.svg')
    const iconc = require('tui-image-editor/dist/svg/icon-c.svg')
    const icond = require('tui-image-editor/dist/svg/icon-d.svg')
    var whiteTheme = {
      'menu.normalIcon.path': icond,
      'menu.activeIcon.path': iconb,
      'menu.disabledIcon.path': icona,
      'menu.hoverIcon.path': iconc,
      'submenu.normalIcon.path': icond,
      'submenu.activeIcon.path': iconb
    }
    return {
      useDefaultUI: true,
      options: {
        includeUI: {
          loadImage: {
            path: '', 
            name: ''
         },
          theme: whiteTheme,
          initMenu: '',
          menuBarPosition: 'bottom',
          menu: ['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'mask'], //, 'filter',
        },
        cssMaxWidth: document.documentElement.clientWidth,
        cssMaxHeight: document.documentElement.clientHeight,
        selectionStyle: {
          cornerSize: 20,
          rotatingPointOffset: 70
        }
      }
    }
  },

Expected Behavior

How to change the default theme to white theme?

why broken css style?

image

Version

1.2.0

Development Environment

MAC OS Mojave

Current Behavior

<template>
  <ImageEditor :options="options"
                ref="tuiImageEditor"
                @addText="onAddText"
                @objectMoved="onObjectMoved"
  ></ImageEditor>
</template>

<script>
import 'tui-image-editor/dist/tui-image-editor.css';
import {ImageEditor} from '@toast-ui/vue-image-editor';
import icon_a from "tui-image-editor/dist/svg/icon-a.svg";
import icon_b from "tui-image-editor/dist/svg/icon-b.svg";
import icon_c from "tui-image-editor/dist/svg/icon-c.svg";
import icon_d from "tui-image-editor/dist/svg/icon-d.svg";

export default {
    components: {
        ImageEditor,
    },
    data() {
        return {
            useDefaultUI: false,
            options: { // for tui-image-editor component's "options" prop
                cssMaxWidth: document.documentElement.clientWidth,
                cssMaxHeight: document.documentElement.clientHeight,
                
                selectionStyle: {
                  cornerSize: 50,
                  rotatingPointOffset: 70
                },

                includeUI : {             
                    initMenu: "filter",
                    menuBarPosition: "bottom",
                    uiSize:{
                        width: "100%",
                        height: "800px",
                    },
                    theme: theme,
                    locale: locale_ko,
                },
                resizeInfo: {
                    uiSize: {
                        width: "500px",
                        height: "500px",
                    },
                    imageSize:{
                        oldWidth: 100,
                        oldHeight: 100,
                        newWidth: 700,
                        newHeight: 700,
                    }
                }
            }
        };
    },
   
}
</script>

// Write example code

Expected Behavior

I loaded picture simply. but why broken css style??

why difference style between nhn and me??

image

How to align text using Toast UI Vue Image Editor Text Alignment?

Version

"@toast-ui/vue-image-editor": "^1.0.2"

Development Environment

Windows 10, Chrome Version 76.0

Current Behavior

Toast Ui Image Editor text alignment not working correctly.
The Text Alignment helpers moves the controller not the text.

import ImageEditor from '@toast-ui/vue-image-editor/src/ImageEditor.vue'
export default {
  name: 'ToastUI',
  components: {
    'image-editor': ImageEditor
  },
  data () {
    return {
      useDefaultUI: true,
      options: {
        includeUI: {
          loadImage: {
            path: '',
            name: ''
          },
          theme: whiteTheme,
          initMenu: ['icon'],
          menuBarPosition: 'bottom',
          menu: ['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'mask', 'filter'] //, 'filter',
        },
        cssMaxWidth: document.documentElement.clientWidth,
        cssMaxHeight: document.documentElement.clientHeight,
        selectionStyle: {
          cornerSize: 20,
          rotatingPointOffset: 70
        },
        usageStatistics: false
      }
 }
}

Expected Behavior

Able to align text with text alignment options
alignment_issue

Enable Download Feature

Version

"@toast-ui/vue-image-editor": "^1.0.2"

Development Environment

macOS/chrome

Current Behavior

when i push Download Button, image displays other tab.
After added file-saver by yarn add command and import this module to component using tui-image-editor,
I can download image to local as I expected.

Is it correct way to enable download feature?
If my understanding is not right, please give me a procedure of import file-saver

loadimagefromfile and loadImageFromURL is not working

I have a imageurl and i need to initialize before the imageeditor open i tried both loadImageFromURL and loadImageFromFile both are not working here is the code please look at it.

Editor.vue
<tui-image-editor :include-ui="useDefaultUI" :options="options" ref="tuiImageEditor"></tui-image-editor>
data() {
      return {
        useDefaultUI: true,
         options: {
            imageSize: {oldWidth: 300, oldHeight: 300, newWidth: 400, newHeight: 400},
            selectionStyle: {
              cornerSize: 20,
              rotatingPointOffset: 70
            },
            cssMaxWidth: 600,
            cssMaxHeight: 400,
            includeUI: {
              theme: blackTheme, // or whiteTheme
              uiSize: {
                width: '1000px',
                height: '100px'
              },
              imageSize: {oldWidth: 200, oldHeight: 200, newWidth: 200, newHeight: 200}
            }
          }
      };
    },
    methods: {
      addDefaultImage() {
        let url = "someImageurl";
        this.$refs.tuiImageEditor.invoke('loadImageFromURL', url, 'My 
         sample image').then((res) => { 
                          console.log(res);
                      });
      }
}

Unknown custom element: <tui-image-editor>

<template>
    <div id="imageEditorApp">
        <tui-image-editor :include-ui="useDefaultUI" :options="options"></tui-image-editor>
    </div>
</template>

<script>
import "../../assets/css/font-family.css"
import "../../assets/css/materialdesignicons.css"
import ImageEditor from '@toast-ui/vue-image-editor';


export default {
    name: 'EditingFrontPage',
    components: {
        'tui-image-editor': ImageEditor,
    },
    data() {
        return {
            useDefaultUI: true,
            options: { // for tui-image-editor component's "options" prop
                cssMaxWidth: 700,
                cssMaxHeight: 500,
            }
        };
    }
}
</script>

<style scoped>
</style> I get the error -

vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

--->
at src/views/Layout.vue
at src/App.vue
Even though I have name registered.

How to export json?

Thank you for support this edit.

I trying to customize function.

But, i dont know json structure in image editor.

Could you please teach me about export Json Structure when image save?

I am unable to install v1.1.0 as NPM still references v1.0.2

Version

v1.0.2

Development Environment

Windows, Chrome and Firefox

Current Behavior

I am unable to install v1.1.0 as NPM still references v1.0.2 and an older version of the TUI image editor as a result ([email protected])

Expected Behavior

I want to be able to install v1.1.0 which comes bundled with "tui-image-editor": "^3.7.0"
I had a look at https://www.npmjs.com/package/@toast-ui/vue-image-editor and the version there is 1.0.2 but Github refers to a newer version??

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.