Grapesjs Style Gpickr
npm install grapesjs-style-gpickrAdds a gradient picker for adding background gradients. To setup correctly check index.html
html
`$3
`js
const editor = grapesjs.init({
container: '#gjs',
height: '100%',
fromElement: true,
storageManager: false,
plugins: ['grapesjs-style-gpickr'],
});
`$3
`css
body, html {
margin: 0;
height: 100%;
}
`
Summary
* Plugin name:
grapesjs-style-gpickrOptions
| Option | Description | Default |
|-|-|-
|
gpickrOpts | gpickr configuration | {} |Download
* CDN
*
https://unpkg.com/grapesjs-style-gpickr
* NPM
* npm i grapesjs-style-gpickr
* GIT
* git clone https://github.com/Ju99ernaut/grapesjs-style-gpickr.gitUsage
Directly in the browser
`html
`Modern javascript
`js
import grapesjs from 'grapesjs';
import plugin from 'grapesjs-style-gpickr';
import 'grapesjs/dist/css/grapes.min.css';const editor = grapesjs.init({
container : '#gjs',
// ...
plugins: [plugin],
pluginsOpts: {
[plugin]: { / options / }
}
// or
plugins: [
editor => plugin(editor, { / options / }),
],
});
`Development
Clone the repository
`sh
$ git clone https://github.com/Ju99ernaut/grapesjs-style-gpickr.git
$ cd grapesjs-style-gpickr
`Install dependencies
`sh
$ npm i
`Start the dev server
`sh
$ npm start
`Build the source
`sh
$ npm run build
``MIT