[Question:] adding classname for custom DomComponent
Question
[Question:]
Hi, I have used this builder plugin in angular 7. This is very well structured and extendable.
But I have some issue in define custom components this plugin.
The Question is How to add Classes to custom DomComponent.
I have created new video wrapper dom component. This contains iframe inside of them. I want following result of this domComponent.
<div class="cus-gjs-video"><iframe class="cus-video-content" src=""></iframe></div>The domComponent code is following.
model: {
defaults: {
type: 'cus-video',
tagName: 'div',
editable: 1,
droppable: 0,
resizable: 0,
video: 'http://localhost:3000/embed/video/5e2a05c94d04d37842cc8ff9',
src: http://localhost:3000/embed/video/5e2a05c94d04d37842cc8ff9,
fallback: Error Video,
autoplay: false,
controls: true,
mute: false,
loop: false,
playMethod: 'inline', // inline | popup
classes: ['gjs-crm-video-wrapper']
}
With this, i can get only following result.
<div><iframe class="cus-video-content" src=""></iframe></div>I want class name of wrapper div of iframe. Is there some solution for this? I appreciate your help. Thanks.
Answers (2)
Can you create a live demo with the complete code of your custom component, please?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2008
[Question]The canvas turns dark and unmodifiable on adding a large piece of custom html.
I used to add custom html with editor.addComponent(). It works well at most of the time, but when I try to insert a large piece of HTML whi...
Issue #1888
[Question] Add custom html inside canvas
Hi there, I'm using grapes to export a custom json with all the information i need, instead of HTML and CSS. For doing that I'm parsing the...
Issue #3079
Issue when adding/viewing custom class inside the panel control
Hi, I try to add custom class using the button on the panel control but it is not working. Check the quick video to see what I'm talking ab...
Issue #2165
[QUESTION] How to extend style manger Sector's property
Hi @artf , We have created a custom asset manager which is working perfectly for image component. However we are not able to call custom as...
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.