# Identify if entire list\_item node is in a selection

**URL:** <https://discuss.prosemirror.net/t/identify-if-entire-list-item-node-is-in-a-selection/3051>\
**Category:** Uncategorized\
**Created:** [July 31, 2020, 3:35pm UTC](https://discuss.prosemirror.net/t/identify-if-entire-list-item-node-is-in-a-selection/3051 "2020-07-31T15:35:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![acotter](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@acotter](https://discuss.prosemirror.net/u/acotter)\
**Post date:** [July 31, 2020, 3:35pm UTC](https://discuss.prosemirror.net/t/identify-if-entire-list-item-node-is-in-a-selection/3051/1 "2020-07-31T15:35:23Z")

</div>

In order to better style lists, I am adding the functionality to add a style attribute to the list item is it’s entire text block is selected. this way if the entire list item is being set to a larger font, the bullet/number will also change to match the selected font.

I have it working if the selection is exactly the entire textnode, but I’m trying to now add the functionality to check if the selection includes a full list item and also some other text to break it up and handle each section differently.

i.e. if I have the below text and I select the the full Hello world bullet point and just the text “Hello” after and set the font to 16, I want the list item to be assigned an attribute font-size = 16px and then “Hello” should get a mark applied.

- foobar
- Helloworld

Hello world again!

I’m not sure how best to break the selection up into its high level nodes…
