Event to get children view
Reproduce the issue in a live demo, if you're able to do so, open an issue as a BUG (follow the template)
Read full answer below ↓Question
I have a problem with a component. When I drop a component into the canvas I create a simple object. Before appending this object I need to check if some attribute is already populated but children are not yet available.
view: defaultView.extend( {
tagName: 'alea-video',
updateContent() {
this.el.innerHTML = "";
this.el.innerHTML = this.model.get('content')
},
init() {
this.listenTo(this.model, 'change:content', this.updateContent);
},
render: function () {
defaultView.prototype.render.apply(this, arguments);
var iframe = document.createElement("iframe");
var value = document.createElement("div");
value.style.pointerEvents = 'none';
value.classList.add("video-container");
if (this.el && this.el.childNodes[0] && this.el.childNodes[0].childNodes[0]) {
value.appendChild(iframe);
}
return this;
},
});
Answers (2)
Reproduce the issue in a live demo, if you're able to do so, open an issue as a BUG (follow the template)
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.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1895
[QUESTION] Drag component over canvas with script, script appended multiple times.
Hi, not sure if this is a bug or not. But I noticed a weird behavior, when I drag a block that has a component that contains a script funct...
Issue #1815
[Bug]: component:mount is fired multiple times
I had been using editor events and I noticed that component:mount event fires multiple times when a component is dragged from blocks to can...
Issue #1234
Template Problems with GrapesJS
Some templates just don't load well. Very simple templates do load properly, but there seems to be a problem with templates with more funct...
Issue #897
How to: find some component at canvas, on event "component:add"
Hi everyone, let say i've added block <form> on canvas. When i adding next <form> (second time) , need to check: if weather this component...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.