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

Empty spans in lists break editing #20

Closed
pbauer opened this issue Dec 11, 2022 · 0 comments
Closed

Empty spans in lists break editing #20

pbauer opened this issue Dec 11, 2022 · 0 comments
Assignees
Labels
01 type: bug something does not work

Comments

@pbauer
Copy link
Member

pbauer commented Dec 11, 2022

Give a empty span in a list:
<ul><li><span>Foo</span><span></span></li></ul>

I get empty spans that can render but fail on editing with Cannot get the end point in the node at path [0] because it has no end text node.:

{
    "@type": "slate",
    "value": [
        {
            "type": "ul",
            "children": [
                {
                    "type": "li",
                    "children": [
                        {
                            "type": "span",
                            "children": [
                                {
                                    "text": "Foo"
                                }
                            ]
                        },
                        {
                            "type": "span",
                            "children": []
                        }
                    ]
                }
            ]
        }
    ],
    "plaintext": "Foo"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 type: bug something does not work
Projects
None yet
Development

No branches or pull requests

2 participants