grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Is there a way to find the number of components

Open ionic666 opened this issue 8 years ago • 2 comments

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

ionic666 avatar Jun 11 '18 06:06 ionic666

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

artf avatar Jun 13 '18 20:06 artf

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.

lock[bot] avatar Sep 17 '19 13:09 lock[bot]