https://github.com/levonet/grapesjs-plugin-page-break
GrapesJS component for making page-break
https://github.com/levonet/grapesjs-plugin-page-break
grapesjs
Last synced: about 1 year ago
JSON representation
GrapesJS component for making page-break
- Host: GitHub
- URL: https://github.com/levonet/grapesjs-plugin-page-break
- Owner: levonet
- License: mit
- Created: 2019-01-08T13:00:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T03:04:45.000Z (over 3 years ago)
- Last Synced: 2025-05-06T19:18:37.951Z (about 1 year ago)
- Topics: grapesjs
- Language: JavaScript
- Size: 906 KB
- Stars: 2
- Watchers: 0
- Forks: 4
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GrapesJS Page-Break Block
This block is used to separate conditional pages that will be printed on separate sheets.
## Summary
* Plugin name: `grapesjs-page-break`
* Blocks
* `page-break`
## Options
|Option|Description|Default|
|-|-|-
|`blockLabel`|Label of the page-break block|`Page-Break`|
|`blockPageBreak`|Object to extend the default page-break block|`{}`|
|`category`|Category label|`Extra`|
## Download
* UNPKG
* `https://unpkg.com/grapesjs-page-break`
* NPM
* `npm i grapesjs-page-break`
* GIT
* `git clone https://github.com/levonet/grapesjs-plugin-page-break.git`
## Usage
Directly in the browser
```html
var editor = grapesjs.init({
container : '#gjs',
// ...
plugins: ['grapesjs-page-break'],
pluginsOpts: {
'grapesjs-page-break': { /* options */ }
}
});
```
Modern javascript
```js
import grapesjs from 'grapesjs';
import yourPluginName from 'grapesjs-page-break';
const editor = grapesjs.init({
container : '#gjs',
// ...
plugins: ['grapesjs-page-break'],
pluginsOpts: {
['grapesjs-page-break']: { /* options */ }
}
});
```
## Development
Clone the repository
```sh
$ git clone https://github.com/levonet/grapesjs-plugin-page-break.git.git
$ cd grapesjs-plugin-page-break
```
Install dependencies
```sh
$ npm i
```
Start the dev server
```sh
$ npm start
```
## License
MIT