├── .gitignore
├── tsconfig.json
├── package.json
├── LICENSE
├── index.html
├── README.md
└── src
└── index.ts
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | private/
3 | node_modules/
4 | .eslintrc
5 | .npmrc
6 | *.log
7 | _index.html
8 | dist/
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./node_modules/grapesjs-cli/dist/template/tsconfig.json",
3 | "include": ["src"]
4 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "grapesjs-tui-image-editor",
3 | "version": "1.0.2",
4 | "description": "GrapesJS TOAST UI Image Editor",
5 | "main": "dist/index.js",
6 | "files": [
7 | "dist/"
8 | ],
9 | "scripts": {
10 | "build": "grapesjs-cli build",
11 | "start": "grapesjs-cli serve"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/GrapesJS/tui-image-editor.git"
16 | },
17 | "keywords": [
18 | "grapesjs",
19 | "plugin",
20 | "image",
21 | "editor"
22 | ],
23 | "author": "Artur Arseniev",
24 | "license": "BSD-3-Clause",
25 | "devDependencies": {
26 | "ajv": "^8.12.0",
27 | "grapesjs": "^0.21.2",
28 | "grapesjs-cli": "^4.1.1",
29 | "tui-image-editor": "^3.15.3"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2019-current, Artur Arseniev
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | - Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 | - Redistributions in binary form must reproduce the above copyright notice, this
10 | list of conditions and the following disclaimer in the documentation and/or
11 | other materials provided with the distribution.
12 | - Neither the name "GrapesJS" nor the names of its contributors may be
13 | used to endorse or promote products derived from this software without
14 | specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 | This is a demo content from index.html. For the development, you shouldn't edit this file, instead you can
22 | copy and rename it to _index.html, on next server start the new file will be served, and it will be ignored by git.
23 |
24 |
25 |
26 |
27 |
28 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GrapesJS TOAST UI Image Editor
2 |
3 | Add the [TOAST UI Image Editor](https://ui.toast.com/tui-image-editor/) on Image Components in GrapesJS
4 |
5 | [Demo](http://grapesjs.com/demo.html)
6 |
7 | 
8 |
9 |
10 | ## Summary
11 |
12 | * Plugin name: `grapesjs-tui-image-editor`
13 | * Commands
14 | * `tui-image-editor` - Open the modal with the image editor.
15 | Options:
16 | * `target` - component from which to get and update the image
17 |
18 |
19 |
20 |
21 |
22 | ## Options
23 |
24 | |Option|Description|Default|
25 | |-|-|-
26 | |`config`|TOAST UI's configuration [object](http://nhnent.github.io/tui.image-editor/latest/ImageEditor.html)|`{}`|
27 | |`constructor`|Pass the editor constructor. By default, the `tui.ImageEditor` will be called|``|
28 | |`labelImageEditor`|Label for the image editor (used in the modal)|`Image Editor`|
29 | |`labelApply`|Label used on the apply button|`Apply`|
30 | |`height`|Default editor height|`650px`|
31 | |`width`|Default editor width|`100%`|
32 | |`commandId`|Id to use to create the image editor command|`tui-image-editor`|
33 | |`toolbarIcon`|Icon used in the image component toolbar. Pass an empty string to avoid adding the icon.|`