This plugin contains some basic blocks for the GrapesJS editor
- Plugin name:
bob-gjs-blocks-post
- Blocks:
bannerPost
Option | Description | Default |
---|---|---|
blocks |
Which blocks to add | ['bannerPost'] (all) |
category |
Category name | Post |
flexGrid |
Make use of flexbox for the grid | false |
stylePrefix |
Classes prefix | gjs- |
addBasicStyle |
Use basic CSS for blocks | true |
rowHeight |
Initial height | 75 |
labelBannerPost |
Banner post label | Banner post |
- CDN
https://unpkg.com/bob-gjs-blocks-post
- NPM
npm i bob-gjs-blocks-post
- GIT
git clone https://github.com/boykioyb/grapesjs-blocks-post.git
Directly in the browser
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="path/to/bob-gjs-blocks-post.min.js"></script>
<div id="gjs"></div>
<script type="text/javascript">
var editor = grapesjs.init({
fromElement: 1,
container: "#gjs",
plugins: ["bob-gjs-blocks-post"],
pluginsOpts: {
"bob-gjs-blocks-post": {
/* ...options */
}
}
});
</script>
Modern javascript
import grapesjs from 'grapesjs';
import plugin from 'bob-grapesjs-blocks-post';
const editor = grapesjs.init({
container : '#gjs',
// ...
plugins: [plugin],
pluginsOpts: {
[plugin]: { /* options */ }
}
// or
plugins: [
editor => plugin(editor, { /* options */ }),
],
});
Clone the repository
$ git clone https://github.com/boykioyb/grapesjs-blocks-post
$ cd grapesjs-blocks-post
Install it
$ npm i
Start the dev server
$ npm start
Build before the commit. This will also increase the patch level version of the package
$ npm run build
BSD 3-Clause