Traits Attributes not reflected when importing an exported template #5658
Unanswered
saharhagekr
asked this question in
Q&A
Replies: 2 comments 1 reply
-
You need to add <a data-gjs-type="sociallink"
data-gjs-draggable="false"
data-gjs-highlightable="false"
data-gjs-draggable="false"
href="#">
HELLO!!!!
</a> |
Beta Was this translation helpful? Give feedback.
1 reply
-
@saharhagekr I hope you're not using HTML/CSS for storing/loading your projects... That would be horribly wrong https://grapesjs.com/docs/modules/Storage.html#project-data ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
quick question
when exporting a template, then importing it again in the editor, i am losing the block attributes
FOR EXAMPLE:
editor.DomComponents.addType('sociallink', {
model: {
defaults: {
name: 'Social link',
selectable: false,
stylable: false,
tagName: 'a',
hoverable: false,
highlightable: false,
draggable: false,
traits: [
{
type: 'input',
name: 'href'
},
],
style: {
'margin': '0px !important'
}
}
}
})
If i have a sociallink block in my template, when i export/import, the draggable, hoverable, highlightable etc.... are not reflected. Even though the data-gjs-type is set to sociallink
Beta Was this translation helpful? Give feedback.
All reactions