GrapesJS TOAST UI Image Editor
npm install grapesjs-tui-image-editorAdd the TOAST UI Image Editor on Image Components in GrapesJS
* Plugin name: grapesjs-tui-image-editor
* Commands
* tui-image-editor - Open the modal with the image editor.
Options:
* target - component from which to get and update the image
|Option|Description|Default|
|-|-|-
|config|TOAST UI's configuration object|{}|
|constructor|Pass the editor constructor. By default, the tui.ImageEditor will be called|`|labelImageEditor
||Label for the image editor (used in the modal)|Image Editor|labelApply
||Label used on the apply button|Apply|height
||Default editor height|650px|width
||Default editor width|100%|commandId
||Id to use to create the image editor command|tui-image-editor|toolbarIcon
||Icon used in the image component toolbar. Pass an empty string to avoid adding the icon.|
* CDN
* https://unpkg.com/grapesjs-tui-image-editornpm i grapesjs-tui-image-editor
* NPM
* git clone https://github.com/GrapesJS/tui-image-editor.git
* GIT
*
Directly in the browser
`html
`
Modern javascript
`js
import grapesjs from 'grapesjs';
import plugin from 'grapesjs-tui-image-editor';
const editor = grapesjs.init({
container : '#gjs',
// ...
plugins: [plugin],
pluginsOpts: {
[plugin]: { / options / }
}
// or
plugins: [
editor => plugin(editor, { / options / }),
],
});
`
Clone the repository
`sh`
$ git clone https://github.com/GrapesJS/tui-image-editor.git
$ cd grapesjs-tui-image-editor
Install dependencies
`sh`
$ npm i
Start the dev server
`sh``
$ npm start
BSD 3-Clause