-
Notifications
You must be signed in to change notification settings - Fork 1
feat & fix: lists plugin bug fixes & backward unformatting step feature #15
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
base: dev
Are you sure you want to change the base?
Conversation
| listItemType = ListsPlugin.LIST_ITEM_ELEMENT, | ||
| defaultType = "paragraph" | ||
| ) => { | ||
| function isList(node: CustomElement) { |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
|
you are right. sorry for the misses. will fix it |
@diamondniam no worries at all! |
1. backward unformatting feature for lists, 2. clean functionality for nested formattings and unformattings, 3. bug fixes
No description provided.