Issue #2003πŸ’¬ AnsweredOpened May 8, 2019by Jogai0 reactions

How to select a specific element nested inside a template

Quick answerby artf

SelectorManager is meant for managing Selector entities (eg adding, updating and removing classes) not for selecting components. In your case, you should do this:

Read full answer below ↓

Question

My test case: https://codepen.io/jogai/pen/QRjKyN?editors=1111

I want to select the middle column so I thought I can use selectorManager.get() but its not selecting what I'm expecting.

I supply the class name (because id doesn't work anyway) and the element with that class name has 4 images. but if I look in the collection I cant see the child elements.

Do I use it wrong? Should I initialize the selectorManager with other options?

Answers (3)

artfβ€’ May 11, 2019

SelectorManager is meant for managing Selector entities (eg adding, updating and removing classes) not for selecting components. In your case, you should do this:

Jogaiβ€’ May 11, 2019

Thanks for clearing up my misunderstanding!

lock[bot]β€’ May 21, 2020

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.