Issue #1191💬 AnsweredOpened June 11, 2018by ionic6660 reactions

Is there a way to find the number of components

Quick answerby artf

You can use find() method at any component, so to get all button components of the canvas, you would do this

Read full answer below ↓

Question

I want to remove the component start from the second,so i need to take the traversal. domc.getComponents() is getting everything.i just want to get something specific such as all the buttons

Answers (2)

artfJune 13, 2018

You can use find() method at any component, so to get all button components of the canvas, you would do this

domc.getWrapper().find('button.some-class'); // returns an array of components
lock[bot]September 17, 2019

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.

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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.