Skip to content

Conversation

@diamondniam
Copy link
Contributor

No description provided.

listItemType = ListsPlugin.LIST_ITEM_ELEMENT,
defaultType = "paragraph"
) => {
function isList(node: CustomElement) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need this function, because we have static isList function inside of a class

at: prevListItemPath,
match: (n) => this.isListItem(editor, n as CustomElement),
match: (n) => {
console.log(
Copy link
Member

Choose a reason for hiding this comment

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

We need to get rid of debugging only console logs

at: range,
match: (n) => {
return Element.isElement(n) && n.type === listItemType;
return Element.isElement(n) && n.type === defaultType;
Copy link
Member

Choose a reason for hiding this comment

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

As far as I understood this code, we're converting only defaultType elements to the list. What if I want to convert a heading into the list? I think this code won't work

@diamondniam
Copy link
Contributor Author

you are right. sorry for the misses. will fix it

@eden-lane
Copy link
Member

you are right. sorry for the misses. will fix it

@diamondniam no worries at all!

@eden-lane eden-lane changed the base branch from main to dev September 13, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants