grapesjs-page-break
Version:
GrapesJS component for making page-break
89 lines (66 loc) • 1.63 kB
Markdown
This block is used to separate conditional pages that will be printed on separate sheets.
* Plugin name: `grapesjs-page-break`
* Blocks
* `page-break`
|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`|
* 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`
Directly in the browser
```html
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="path/to/grapesjs-page-break.min.js"></script>
<div id="gjs"></div>
<script type="text/javascript">
var editor = grapesjs.init({
container : '#gjs',
// ...
plugins: ['grapesjs-page-break'],
pluginsOpts: {
'grapesjs-page-break': { /* options */ }
}
});
</script>
```
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 */ }
}
});
```
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
```
MIT