facebook / facebook/lexical

Feature: How do I style the last-inserted list?

Open
#4,303 1 comment 0 reactions 0 assignees View on GitHub
enhancement lists
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

I'm working with list insertions and I have a selection, the selection becomes transformed into a a ordered list, and I want to change the "list-style-type" of the new list. But when I insert the list, my selection becomes in a old state and I can't find the list in the dom to apply the styles.

So when the user selects a text, the paragraph transformed to a ordered list, the selection continues visible, but is a old state and I lost all the direction to find the element and style it.

Should we have some ref of the inserted list element or something like that in the "insertList" method, the docs isn't clear about how to insert and use list package, the playground is outdated

![image](https://user-images.githubusercontent.com/82672149/231216238-061abcdd-e154-490a-bf68-15137f82e7c7.png)

Maybe is related to #3777

My setup

"lexical": "^0.9.1",
"@lexical/react": "^0.9.1",
"react": "^17.0.2",

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.