Skip to content

Commit 2a7003b

Browse files
authored
Merge pull request #39 from artf/update
Update
2 parents d4ceea9 + 637d871 commit 2a7003b

13 files changed

+2757
-6086
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
npm-debug.log
77
style/.sass-cache/
88

9+
dist/
910
img/
1011
images/
1112
private/

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ Available components:
2020

2121
## Options
2222

23-
* `blocks` Which blocks to add, default: `['form', 'input', 'textarea', 'select', 'button', 'label', 'checkbox', 'radio']` (all)
23+
| Option | Description | Default|
24+
| --------------- | -------------------------------- | ----------------------------------------------------------------------------------------|
25+
|`blocks`|Which blocks to add| `['form', 'input', 'textarea', 'select', 'button', 'label', 'checkbox', 'radio']` (all) |
26+
|`category`|Category name|`Forms`|
27+
|`block`|Add custom block options, based on block id.|`(blockId) => ({})`|
2428

2529

2630

dist/grapesjs-plugin-forms.min.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

dist/grapesjs-plugin-forms.min.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

index.html

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<title>GrapesJS Plugin Forms</title>
66
<link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
77
<script src="https://unpkg.com/grapesjs"></script>
8-
<script src="dist/grapesjs-plugin-forms.min.js"></script>
98
<style>
109
body, html{ height: 100%; margin: 0;}
1110

@@ -56,17 +55,19 @@
5655

5756

5857
<script type="text/javascript">
59-
var editor = grapesjs.init({
60-
height: '100%',
61-
noticeOnUnload: 0,
62-
storageManager:{autoload: 0},
63-
container : '#gjs',
64-
fromElement: true,
58+
setTimeout(() => {
59+
window.editor = grapesjs.init({
60+
height: '100%',
61+
noticeOnUnload: false,
62+
storageManager: false,
63+
container : '#gjs',
64+
fromElement: true,
6565

66-
plugins: ['grapesjs-plugin-forms'],
67-
pluginsOpts: {
68-
'grapesjs-plugin-forms': {}
69-
}
66+
plugins: ['grapesjs-plugin-forms'],
67+
pluginsOpts: {
68+
'grapesjs-plugin-forms': {}
69+
}
70+
});
7071
});
7172
</script>
7273
</body>

0 commit comments

Comments
 (0)