Skip to content

Commit

Permalink
Updated Traits
Browse files Browse the repository at this point in the history
  • Loading branch information
dipaksarkar committed Apr 28, 2024
1 parent 028ea47 commit 69d14bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@
},
},
'grapesjs-templates': {
contactForms: [{ id: '', label: 'Select a Form' }, { id: 1000, label: 'Contact us' }, { id: 1001, label: 'Contact us 2' }],
contactForms: [
{ id: 1000, label: 'Contact us' },
{ id: 1001, label: 'Contact us 2' }
],
templates: 'http://localhost:3000/templates',
projects: 'http://localhost:3000/projects',
//onLoad: (type) => {
Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default (editor, opts = {}) => {
i18n: {},
templates: null,
projects: null,
shortCodes: true,
announcementsTraits: [],
blogsTraits: [],
productsTraits: [],
Expand Down Expand Up @@ -65,5 +66,7 @@ export default (editor, opts = {}) => {
loadShortCode(editor, options)

// Load Short Codes
loadShortCodes(editor, options)
if (options?.shortCodes) {
loadShortCodes(editor, options)
}
}
2 changes: 1 addition & 1 deletion src/shortcodes/contact-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default (editor, options = {}) => {
name: 'form',
label: 'From',
changeProp: 1,
options: contactForms
options: [{ id: '', label: 'Select a Form' }, ...contactForms]
},
...contactFormsTraits,
...defaultType.model.prototype.defaults.traits
Expand Down

0 comments on commit 69d14bc

Please sign in to comment.