[Question] Can I make everything unselectable by default?
Currently all components are selectable/hoverable by default.
And if you want you can change that behavior by providing data-gjs-hoverable=fase in the template.
Is there any way to change this so selectable/hoverable is false by default, unless data-gjs-hoverable=true is provided?
Thank you btw. Grapes is amazing.
Hello @emilsedgh Please check the below code it may help you.
editor.on('load', function()
{
const updateAll = model => {
model.set({editable: false,selectable:false,hoverable:false});
model.get('components').each(model => updateAll(model));
}
updateAll(editor.DomComponents.getWrapper());
});
Thank you very much @YashPrince
I suppose I can use a custom data attribute to exclude the ones I want to be editable right?
Feel free to close this question btw. Thanks for answering.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.