Skip to content

Commit

Permalink
Update onLoad blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Oct 9, 2017
1 parent 572b181 commit 2db17ff
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 28 deletions.
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions dist/grapes.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions src/block_manager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},

/**
Expand Down

0 comments on commit 2db17ff

Please sign in to comment.