Browse Source

Update onLoad blocks

pull/406/head
Artur Arseniev 9 years ago
parent
commit
2db17ffc49
  1. 11
      README.md
  2. 8
      dist/grapes.min.js
  3. 1
      index.html
  4. 15
      package.json
  5. 6
      src/block_manager/index.js

11
README.md

@ -38,7 +38,6 @@ Newsletter Demo - http://grapesjs.com/demo-newsletter-editor.html
* [API](#api)
* [Testing](#testing)
* [Plugins](#plugins)
* [Sponsors](#sponsors)
* [Support](#support)
* [License](#license)
@ -205,16 +204,6 @@ Find out more about plugins here: [Creating plugins](https://github.com/artf/gra
## Sponsors
The project is sponsored by
[![Sendloop](http://grapesjs.com/img/sendloop-logo-l.png)](https://sendloop.com)
## Support
If you like the project support it with a donation of your choice or become a backer/sponsor via [Open Collective](https://opencollective.com/grapesjs)

8
dist/grapes.min.js

File diff suppressed because one or more lines are too long

1
index.html

@ -4,7 +4,6 @@
<meta charset="utf-8">
<title>GrapesJS</title>
<link rel="stylesheet" href="dist/css/grapes.min.css">
<!-- script src="node_modules/jquery/dist/jquery.min.js"></script -->
<script src="dist/grapes.min.js"></script>
</head>

15
package.json

@ -1,7 +1,7 @@
{
"name": "grapesjs",
"description": "Free and Open Source Web Builder Framework",
"version": "0.11.4",
"version": "0.12.3",
"author": "Artur Arseniev",
"license": "BSD-3-Clause",
"homepage": "http://grapesjs.com",
@ -44,18 +44,15 @@
"whatwg-fetch": "^2.0.3"
},
"keywords": [
"wte",
"grapes",
"grapesjs",
"web template editor",
"web site builder",
"web template builder",
"html website builder",
"site builder",
"newsletter builder",
"wysiwyg",
"web",
"template",
"editor"
"editor",
"newsletter",
"site",
"builder"
],
"babel": {
"presets": [

6
src/block_manager/index.js

@ -99,11 +99,11 @@ module.exports = () => {
},
/**
* Loading blocks with `onLoad` allows to init starting collection
* from plugins
* Load default blocks if the collection is empty
*/
onLoad() {
this.getAll().reset(c.blocks);
const blocks = this.getAll();
!blocks.length && blocks.reset(c.blocks);
},
/**

Loading…
Cancel
Save