Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical] Feature: Add listStyleType support to ListNode for customizable list styles #7285

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Tiscs
Copy link

@Tiscs Tiscs commented Mar 4, 2025

Description

Add listStyleType support to ListNode for customizable list styles.

Test plan

Before

By default:

image

After

When set to 'circle'

image

Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 10, 2025 1:13pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 10, 2025 1:13pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 4, 2025
@Tiscs Tiscs marked this pull request as ready for review March 4, 2025 06:44
Copy link
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why you decided to add this property instead of using listNode.setStyle('list-style-type: …') and implementing the __style property in createDOM/updateDOM/exportDOM? It's already there, it's just that the DOM methods aren't currently using it (not for a good reason).

@Tiscs
Copy link
Author

Tiscs commented Mar 6, 2025

Is there a reason why you decided to add this property instead of using listNode.setStyle('list-style-type: …') and implementing the __style property in createDOM/updateDOM/exportDOM? It's already there, it's just that the DOM methods aren't currently using it (not for a good reason).

The rationale for adding the __listStyleType property is to provide a more specific and type-safe way to control list styling, rather than reusing a generic __style property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants