[Question] gjs-editable='false' works only on drag drog
Question
I have created a component
var comps = editor.DomComponents;
var defaultType = comps.getType('default');
var defaultModel = defaultType.model;
var defaultView = defaultType.view;
comps.addType('module', {
model: defaultModel.extend({
defaults: Object.assign({}, defaultModel.prototype.defaults, {
droppable: false,
editable: false
})
},
{
isComponent: function (el) {
if (el.tagName == 'div' || el.tagName == 'DIV' && (el.attributes.desktopmoduleid != undefined)) {
return { type: 'module' };
}
}
})
});
`editor.BlockManager.add(value.ModuleName, {
category: 'apps',
attributes: { type: 'apps' },
label: '<div><img src="' + value.ModuleImage + '"/><div class="my-label-block">' + value.ModuleName + '</div></div>',
content: '<div desktopmoduleid="' + value.ModuleID + '" mid="" gjs-editable="false" gjs-type="module" gjs-droppable="false" style="padding:10px;">' + value.ModuleName + '</div>'
})`
The gjs-editable="false" works only on drag drop, its not working on page load after saved.Answers (1)
I am able to fix this by creating plugin
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2549
[QUESTION] Update component view on property change
Hi everyone, I'm trying to create a component that will update it's view based on a property value My approach is bassed on #1227 and on th...
Issue #2839
[Question] I added one component named template in the blocks but when i try to drag another components inside this template component ,it will be dragged but after saving it removes all the components inside it. How to avoid this?
This is code of template component: I debugged it, so i got that : setComponents method in the dom_components clearing it ...but not gettin...
Issue #1959
[Question] Edit innerHTML in a custom button
Hi All, I am trying to change the text in a button component, but I am not able to edit it. I added this type: I included the editable: tru...
Issue #1849
What am I missing ?
What am I missing to make the tag "div" named as "Div" by default ? (Override the default)
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.