{"id":17700401,"url":"https://github.com/maldoinc/tui-image-editor-js","last_synced_at":"2025-03-31T02:27:36.492Z","repository":{"id":89617038,"uuid":"398233853","full_name":"maldoinc/tui-image-editor-js","owner":"maldoinc","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-27T10:38:58.000Z","size":4019,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T07:29:57.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maldoinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-20T10:06:35.000Z","updated_at":"2021-08-27T10:39:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6f091a2-7b3d-494d-9f4f-d054732c1e3d","html_url":"https://github.com/maldoinc/tui-image-editor-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maldoinc%2Ftui-image-editor-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maldoinc%2Ftui-image-editor-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maldoinc%2Ftui-image-editor-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maldoinc%2Ftui-image-editor-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maldoinc","download_url":"https://codeload.github.com/maldoinc/tui-image-editor-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246405526,"owners_count":20771799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-24T17:42:05.960Z","updated_at":"2025-03-31T02:27:36.467Z","avatar_url":"https://github.com/maldoinc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![Toast UI ImageEditor](https://user-images.githubusercontent.com/35218826/40895380-0b9f4cd6-67ea-11e8-982f-18121daa3a04.png)\n\n\u003e Full featured image editor using HTML5 Canvas. It's easy to use and provides powerful filters.\n\n[![npm version](https://img.shields.io/npm/v/tui-image-editor.svg)](https://www.npmjs.com/package/tui-image-editor)\n\n## 🚩 Table of Contents\n\n- [Collect statistics on the use of open source](#Collect-statistics-on-the-use-of-open-source)\n- [Install](#-install)\n  - [Via Package Manager](#via-package-manager)\n  - [Via Contents Delivery Network (CDN)](#via-contents-delivery-network-cdn)\n  - [Download Source Files](#download-source-files)\n- [Usage](#-usage)\n  - [HTML](#html)\n  - [JavaScript](#javascript)\n  - [Menu svg icon setting](#menu-svg-icon-setting)\n  - [TypeScript](#typescript)\n\n## Collect statistics on the use of open source\n\nTOAST 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. \u003e “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.\n\n```js\nconst options = {\n  //...\n  usageStatistics: false,\n};\n\nconst imageEditor = new tui.ImageEditor('#tui-image-editor-container', options);\n```\n\nOr, include [`tui-code-snippet`](https://github.com/nhn/tui.code-snippet)(**v1.4.0** or **later**) and then immediately write the options as follows:\n\n```js\ntui.usageStatistics = false;\n```\n\n## 💾 Install\n\nThe TOAST UI products can be installed by using the package manager or downloading the source directly.\nHowever, we highly recommend using the package manager.\n\n### Via Package Manager\n\nYou can find TOAST UI products via [npm](https://www.npmjs.com/) and [bower](https://bower.io/) package managers.\nInstall by using the commands provided by each package manager.\nWhen using npm, be sure [Node.js](https://nodejs.org) is installed in the environment.\n\n#### npm\n\n##### 1. ImageEditor installation\n\n```sh\n$ npm install --save tui-image-editor # Latest version\n$ npm install --save tui-image-editor@\u003cversion\u003e # Specific version\n```\n\n##### 2. If the installation of the `fabric.js` dependency module does not go smoothly\n\nTo solve the problem, you need to refer to [Some Steps](https://github.com/fabricjs/fabric.js#install-with-npm) to solve the problem.\n\n#### bower\n\n```sh\n$ bower install tui-image-editor # Latest version\n$ bower install tui-image-editor#\u003ctag\u003e # Specific version\n```\n\n### Via Contents Delivery Network (CDN)\n\nTOAST UI products are available over the CDN powered by [TOAST Cloud](https://www.toast.com).\n\nYou can use the CDN as below.\n\n```html\n\u003clink\n  rel=\"stylesheet\"\n  href=\"https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.css\"\n/\u003e\n\u003cscript src=\"https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.js\"\u003e\u003c/script\u003e\n```\n\nIf you want to use a specific version, use the tag name instead of `latest` in the URL.\n\nThe CDN directory has the following structure.\n\n```\ntui-image-editor/\n├─ latest/\n│  ├─ tui-image-editor.js\n│  ├─ tui-image-editor.min.js\n│  └─ tui-image-editor.css\n├─ v3.1.0/\n│  ├─ ...\n```\n\n### Download Source Files\n\n- [Download bundle files from `dist` folder](https://github.com/nhn/tui.image-editor/tree/production/dist)\n- [Download all sources for each version](https://github.com/nhn/tui.image-editor/releases)\n\n## 🔨 Usage\n\n### HTML\n\nAdd the container element where TOAST UI ImageEditor will be created.\n\n```html\n\u003cbody\u003e\n  ...\n  \u003cdiv id=\"tui-image-editor\"\u003e\u003c/div\u003e\n  ...\n\u003c/body\u003e\n```\n\n### javascript\n\nAdd dependencies \u0026 initialize ImageEditor class with given element to make an image editor.\n\n```javascript\nconst ImageEditor = require('tui-image-editor');\nconst FileSaver = require('file-saver'); //to download edited image to local. Use after npm install file-saver\nconst blackTheme = require('./js/theme/black-theme.js');\nconst locale_ru_RU = {\n  // override default English locale to your custom\n  Crop: 'Обзрезать',\n  'Delete-all': 'Удалить всё',\n  // etc...\n};\nconst instance = new ImageEditor(document.querySelector('#tui-image-editor'), {\n  includeUI: {\n    loadImage: {\n      path: 'img/sampleImage.jpg',\n      name: 'SampleImage',\n    },\n    locale: locale_ru_RU,\n    theme: blackTheme, // or whiteTheme\n    initMenu: 'filter',\n    menuBarPosition: 'bottom',\n  },\n  cssMaxWidth: 700,\n  cssMaxHeight: 500,\n  selectionStyle: {\n    cornerSize: 20,\n    rotatingPointOffset: 70,\n  },\n});\n```\n\nOr\n\n```javascript\nconst ImageEditor = require('tui-image-editor');\nconst instance = new ImageEditor(document.querySelector('#tui-image-editor'), {\n  cssMaxWidth: 700,\n  cssMaxHeight: 500,\n  selectionStyle: {\n    cornerSize: 20,\n    rotatingPointOffset: 70,\n  },\n});\n```\n\n### Menu svg icon setting\n\n#### There are two ways to set icons.\n\n1. **Use default svg built** into imageEditor without setting svg file path (Features added since version v3.9.0).\n2. There is a way to use the **actual physical svg file** and **set the file location manually**.\n\nCan find more details in [this document](https://github.com/nhn/tui.image-editor/blob/master/docs/Basic-Tutorial.md#4-menu-submenu-svg-icon-setting).\n\n### TypeScript\n\nIf you use TypeScript, You must `import module = require('module')` on importing.\n[`export =` and `import = require()`](https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require)\n\n```typescript\nimport ImageEditor = require('tui-image-editor');\nconst FileSaver = require('file-saver'); //to download edited image to local. Use after npm install file-saver\n\nconst instance = new ImageEditor(document.querySelector('#tui-image-editor'), {\n  cssMaxWidth: 700,\n  cssMaxHeight: 500,\n  selectionStyle: {\n    cornerSize: 20,\n    rotatingPointOffset: 70,\n  },\n});\n```\n\nSee [details](https://nhn.github.io/tui.image-editor/latest) for additional information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaldoinc%2Ftui-image-editor-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaldoinc%2Ftui-image-editor-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaldoinc%2Ftui-image-editor-js/lists"}