Describe the bug
A bug occurs when trying to remove an item from a list after applying bold formatting to it. Instead of just removing the list formatting, the entire list item gets unexpectedly deleted. This issue arises specifically after a list item has been bolded and a subsequent attempt is made to unlist or change its format to normal text.
Create a list in the editor (either numbered or bulleted).
Add an item to the list.
Apply bold formatting to this list item.
Attempt to unlist or remove the list formatting from the bolded item.
Observe that the entire list item gets deleted, instead of just losing its list formatting.
Expected behavior
The expected behavior in this scenario is that after applying bold formatting to a list item, a user should be able to unlist it, converting it into a regular paragraph or line of text that retains the bold styling. The text itself should remain visible and not be deleted.
Describe the bug A bug occurs when trying to remove an item from a list after applying bold formatting to it. Instead of just removing the list formatting, the entire list item gets unexpectedly deleted. This issue arises specifically after a list item has been bolded and a subsequent attempt is made to unlist or change its format to normal text.
Related repository
To Reproduce
Expected behavior The expected behavior in this scenario is that after applying bold formatting to a list item, a user should be able to unlist it, converting it into a regular paragraph or line of text that retains the bold styling. The text itself should remain visible and not be deleted.
Screenshots Loom link => https://www.loom.com/share/4d57ea326fc5400a8a42f8f0fc6f1080?sid=97004fb2-1977-4ee4-b91f-caae974ab171
Code Sandbox Demo https://codesandbox.io/p/github/ashu-dev-ops/sun_editor/draft/infallible-turing?file=%2Fsrc%2FApp.js&workspaceId=cb501c97-5bbb-44d5-83b6-22a987ebb59d
Desktop (please complete the following information):
Additional context Add any other context about the problem here.