directus icon indicating copy to clipboard operation
directus copied to clipboard

List in block editor generating hyperlink on the next line

Open johnkmzhou opened this issue 1 year ago • 1 comments

Describe the Bug

When using a list in the block editor, after creating a link, when you press enter to make a new list item, the editor generates a copy of the link in the next item.

An example of the raw value:

{
    "time": 1717124750891,
    "blocks": [
        {
            "id": "zT9RSGb6BI",
            "type": "nestedlist",
            "data": {
                "style": "unordered",
                "items": [
                    {
                        "content": "<a href=\"https://www.google.com\">link</a>",
                        "items": []
                    },
                    {
                        "content": "not a link<a href=\"https://www.google.com\"></a>",
                        "items": []
                    }
                ]
            }
        }
    ],
    "version": "2.29.1"
}

To Reproduce

  1. Create a Block Editor field.
  2. Add a list block.
  3. Create a link in the first line.
  4. Press enter.

Directus Version

10.11.1

Hosting Strategy

Self-Hosted (Custom)

Database

No response

johnkmzhou avatar May 31 '24 03:05 johnkmzhou

I believe this is similar or the same issue as https://github.com/codex-team/editor.js/issues/2545

br41nslug avatar May 31 '24 10:05 br41nslug

This is a known issue at editorjs, which we've flagged over at their repo. As it's a third-party package it's very tricky for us to fix internally. As such I'm going to close this out.

AlexGaillard avatar Apr 02 '25 15:04 AlexGaillard