Giter Site home page Giter Site logo

img-js / mini-canvas-editor Goto Github PK

View Code? Open in Web Editor NEW
49.0 2.0 12.0 438 KB

JavaScript image editor as component. Integrate with any front-end framework.

Home Page: https://img-js.github.io/mini-canvas-editor/webpack-app/public/template-creator.html

License: MIT License

JavaScript 6.29% TypeScript 88.40% CSS 5.17% Shell 0.13%
canvas canvas-editor canvasjs paint paint-js photo-editing photo-editor canvas-js inpainting inpainting-editor photo-editing-app fabricjs

mini-canvas-editor's Introduction

Mini Canvas Editor

Mini Canvas Editor

Build Status License: MIT View this project on NPM

Canvas editor component for JavaScript application. Works with any front-end framework. Easy to integrate and use. Well-known graphical interface. Edit images, draw shapes, add texts and more. Gzipped size less than 100 KB. Uses Fabric.js internally.

Main use cases:

  • resize image,
  • crop image,
  • create a template, render it on the front-end and the back-end (Node.js only),
  • create inpainting mask.

Online Examples:

๐Ÿš€ Installation

To use the editor you should add JS/TS files and CSS files to your project.

NPM

Install this package by NPM command:

npm i mini-canvas-editor

To import the package:

import { Editor } from 'mini-canvas-editor';

If you use css-loader or similar, you can add CSS files to your bundle:

import 'mini-canvas-editor/css/editor.css';

To create the editor write the below code:

Editor.createBlank(placeholder, 200, 300, {});

CDN

Add the below code to your head section in HTML document.

<head>
...
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/editor.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js"></script>

Create the editor by:

miniCanvasEditor.Editor.createBlank(placeholder, 200, 300, {});

๐Ÿ’ก License

This project is released under the MIT license.

mini-canvas-editor's People

Contributors

b4rtaz 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

Watchers

 avatar  avatar

mini-canvas-editor's Issues

How to use this JS library to crop images?

Hello,
Firstly, I'd like to commend you on creating such a lightweight and intuitive tool โ€“ it's impressive!

I'm considering integrating this library into a web app for basic photo editing functionalities. Based on the README, it seems this library supports image cropping. However, when I load an image, I couldn't find the tool or option for cropping. Could you please guide me on how this functionality works or if there's a specific way to access it?

Thank you in advance!

API Documentation?

Hello,
This looks like a really cool project! Do you have any API documentation available? Things I'm looking at doing in particular:

  • How can I export an image template to some sort of JSON object so I can parse it myself and render server-side?
  • Is there documentation showing how to turn features on/off? e.g. turn off paint brush, add/remove fonts, etc?

Thanks!

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.