Browse Source

v0.3.30

pull/36/head
Artur Arseniev 9 years ago
parent
commit
dc0061bc8f
  1. 2
      bower.json
  2. 31
      dist/grapes.min.js
  3. 2
      index.html
  4. 2
      package.json
  5. 41
      src/demo.js
  6. 22
      src/editor/config/config.js

2
bower.json

@ -1,7 +1,7 @@
{
"name": "grapesjs",
"description": "Open source Web Template Editor",
"version": "0.3.27",
"version": "0.3.30",
"author": "Artur Arseniev",
"homepage": "http://grapesjs.com",
"main": [

31
dist/grapes.min.js

File diff suppressed because one or more lines are too long

2
index.html

@ -15,6 +15,7 @@
<div id="gjs" style="height:0px; overflow:hidden">
<header class="header-banner">
<div class="container-width">
<!--
<table>
<thead>
<tr> <th>Header1</th> <th>Header2</th> <th>Header3</th> </tr>
@ -32,7 +33,6 @@
<tr> <td>Row21</td> <td>Row22</td> <td>Row23</td> </tr>
<tr> <td>Row31</td> <td>Row32</td> <td><div>Div Content Row33</div></td> </tr>
</table>
<!--
<iframe class="iframe" src="http://player.vimeo.com/video/2?&controls=0&loop=1&color=ff0000"></iframe>
<iframe class="iframe" src="https://maps.google.com/maps?&q=London, UK&z=11&t=q&output=embed"></iframe>
-->

2
package.json

@ -1,7 +1,7 @@
{
"name": "grapesjs",
"description": "Open source Web Template Editor",
"version": "0.3.27",
"version": "0.3.30",
"author": "Artur Arseniev",
"license": "BSD-3-Clause",
"homepage": "http://grapesjs.com",

41
src/demo.js

@ -44,41 +44,6 @@ require(['config/require-config'], function() {
sender.set('active',false);
window.open('https://github.com/artf/grapesjs','_blank');
}
},{
id: 'sw-images',
run: function(editor, sender){
var srcPlh = '##';
var components = editor.getComponents();
var searchImage = function(components) {
components.each(function(comp){
if(comp.get('type') == 'image'){
if(comp.get('src') != srcPlh){
comp.set('src_bkp', comp.get('src'));
comp.set('src', srcPlh);
console.log('Stored', comp.get('src_bkp'));
}
}
searchImage(comp.get('components'));
});
};
searchImage(components);
},
stop: function() {
var srcPlh = '##';
var components = editor.getComponents();
var searchImage = function(components) {
components.each(function(comp){
if(comp.get('type') == 'image'){
if(comp.get('src') == srcPlh){
comp.set('src', comp.get('src_bkp'));
console.log('Restored', comp.get('src'));
}
}
searchImage(comp.get('components'));
});
};
searchImage(components);
}
},{
id: 'undo',
run: function(editor, sender){
@ -361,12 +326,6 @@ require(['config/require-config'], function() {
);
editor.Panels.addButton('options', [{
id: 'sw-images',
className: 'fa fa-image',
command: 'sw-images',
attributes: { title: 'View on Github' }
}]);
window.editor = editor;

22
src/editor/config/config.js

@ -193,16 +193,6 @@ define(function () {
type: 'map',
style: {height: '350px'}
},
},{
id: 'table',
label: 'Table',
attributes: {class:'fa fa-table'},
content: {
type: 'table',
columns: 3,
rows: 5,
style: {height: '150px', width: '100%'}
},
},{
id: 'video',
label: 'Video',
@ -215,7 +205,17 @@ define(function () {
width: '615px',
}
},
}],
}/*,{
id: 'table',
label: 'Table',
attributes: {class:'fa fa-table'},
content: {
type: 'table',
columns: 3,
rows: 5,
style: {height: '150px', width: '100%'}
},
}*/],
},
};

Loading…
Cancel
Save