Issue #2679💬 AnsweredOpened March 24, 2020by LOMFM0 reactions

Adding classname for custom DomComponent

快速解答by artf

Can you create a live demo with the complete code of your custom component, please?

Read full answer below ↓

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)

artfApril 1, 2020

Can you create a live demo with the complete code of your custom component, please?

no-response[bot]April 11, 2020

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.