Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

It can be difficult at times to determine exactly which element you’re applying classes to in WYSIWYGs. In some cases, you may want to select a particular element, but clicking on it only selects the element’s contents. Here’s how to specify which element you want selected. We’ll use a list for our example.

nested lists in a wysiwyg

Step 1: select anything in the list

Here we’ve clicked on subitem b.

clicking the list selects the list contents

After doing so, the WYSIWYG informs us the path of the selected element in the footer of the WYSIWYG frame, which is ul > li > ul > li > span. What we ultimately want selected is the topmost <ul> element, not the heavily nested <span> that is currently selected.

Step 2: select the desired element from the selected element path

To select the topmost <ul>, we’ll click on the first ul listed in the currently selected element path.

selecting the topmost list element

This results in the topmost list <ul> element being selected. Hooray!

topmost list element is selected

  • No labels