Skip to content

Commit bbdf047

Browse files
committed
2 parents 4d59c39 + 4601b07 commit bbdf047

File tree

7 files changed

+5201
-13
lines changed

7 files changed

+5201
-13
lines changed

dist/grapesjs-plugin-forms.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "grapesjs-plugin-forms",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Set of forms components and blocks for GrapesJS editor",
55
"main": "dist/grapesjs-plugin-forms.min.js",
66
"sideEffects": false,

src/blocks.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function (editor, opt = {}) {
1111
<rect class="gjs-block-svg-path" x="2" y="15" width="10" height="3" rx="0.5"></rect>
1212
</svg>
1313
<div class="gjs-block-label">${c.labelForm}</div>`,
14-
category: 'Forms',
14+
category: c.category,
1515
content: `
1616
<form class="form">
1717
<div class="form-group">
@@ -49,7 +49,7 @@ export default function (editor, opt = {}) {
4949
<polygon class="gjs-block-svg-path" points="4 10 5 10 5 14 4 14"></polygon>
5050
</svg>
5151
<div class="gjs-block-label">${c.labelInputName}</div>`,
52-
category: 'Forms',
52+
category: c.category,
5353
content: '<input class="input"/>',
5454
});
5555
}
@@ -65,7 +65,7 @@ export default function (editor, opt = {}) {
6565
<polygon class="gjs-block-svg-path" points="20 15 21 15 21 16 20 16"></polygon>
6666
</svg>
6767
<div class="gjs-block-label">${c.labelTextareaName}</div>`,
68-
category: 'Forms',
68+
category: c.category,
6969
content: '<textarea class="textarea"></textarea>',
7070
});
7171
}
@@ -79,7 +79,7 @@ export default function (editor, opt = {}) {
7979
<rect class="gjs-block-svg-path" x="4" y="11.5" width="11" height="1"></rect>
8080
</svg>
8181
<div class="gjs-block-label">${c.labelSelectName}</div>`,
82-
category: 'Forms',
82+
category: c.category,
8383
content: `<select class="select">
8484
${c.labelSelectOption ? `<option value="">${c.labelSelectOption}</option>` : ''}
8585
<option value="1">${c.labelOption} 1</option>
@@ -95,7 +95,7 @@ export default function (editor, opt = {}) {
9595
<rect class="gjs-block-svg-path" x="4" y="11.5" width="16" height="1"></rect>
9696
</svg>
9797
<div class="gjs-block-label">${c.labelButtonName}</div>`,
98-
category: 'Forms',
98+
category: c.category,
9999
content: '<button class="button">Send</button>',
100100
});
101101
}
@@ -109,7 +109,7 @@ export default function (editor, opt = {}) {
109109
<polygon class="gjs-block-svg-path" fill-rule="nonzero" points="4 13 5 13 5 16 4 16"></polygon>
110110
</svg>
111111
<div class="gjs-block-label">${c.labelNameLabel}</div>`,
112-
category: 'Forms',
112+
category: c.category,
113113
content: '<label class="label">Label</label>',
114114
});
115115
}
@@ -118,7 +118,7 @@ export default function (editor, opt = {}) {
118118
bm.add('checkbox', {
119119
label: c.labelCheckboxName,
120120
attributes: {class:'fa fa-check-square'},
121-
category: 'Forms',
121+
category: c.category,
122122
content: '<input type="checkbox" class="checkbox"/>',
123123
});
124124
}
@@ -127,7 +127,7 @@ export default function (editor, opt = {}) {
127127
bm.add('radio', {
128128
label: c.labelRadioName,
129129
attributes: {class:'fa fa-dot-circle-o'},
130-
category: 'Forms',
130+
category: c.category,
131131
content: '<input type="radio" class="radio"/>',
132132
});
133133
}

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default (editor, opts = {}) => {
3939
labelStateNormal: 'Normal',
4040
labelStateSuccess: 'Success',
4141
labelStateError: 'Error',
42+
category: 'Forms',
4243
...opts
4344
};
4445

0 commit comments

Comments
 (0)