-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Problem with custom component type and table cell #2697
Comments
@kuhelbeher because your component is a |
@noogen I don't think the problem is with this. I tried to define component and block like this: domc.addType('custom-cell', {
extends: 'cell',
model: {
defaults: {
removable: false,
name: 'Custom cell',
type: 'custom-cell',
copyable: false,
tagName: 'td'
}
}
})
bm.add('root', {
label: 'Page Wrapper',
category: opt.category,
content: `
<table width="400px">
<tbody>
<tr>
<td data-gjs-type="custom-cell">
</td>
</tr>
</tbody>
</table>
`,
}) But the problem remains - td tag (and all what is inside of it) doesn't appear on canvas, Maybe I'm doing something wrong? |
@kuhelbeher your code is correct (except is const modelDefault = domc.getType('default').model;
domc.addType('row', {
model: {
initialize() {
modelDefault.prototype.initialize.apply(this, arguments);
},
}
}); and now it should work: https://jsfiddle.net/corasd1h/ |
Hello! I'm trying to add custom component type:
And also I'm adding new block:
But when I drop this block on the canvas the tag doesn't appear on canvas and DOM. If I remove isComponent function from component definition, it works as expected. Could I get help with this?
The text was updated successfully, but these errors were encountered: