Skip to content

Conversation

@astrocket
Copy link
Contributor

Current version of nested-list can render Case 2 style only.

This PR refactors pasteHandler to support Case 1, Case 2 and Mix of each cases.

Pasted Case 1.

    <ul>
      <li>editor</li>
      <ul>
        <li>nested-list</li>
      </ul>
    </ul>

Pasted Case 2

    <ul>
      <li>
        editor
        <ul>
          <li>nested-list</li>
        </ul>
      </li>
    </ul>

@bettysteger
Copy link

Case 2 is the correct HTML structure, see https://stackoverflow.com/a/5899394/595152

@astrocket
Copy link
Contributor Author

@bettysteger I agree, but it is used in real world and users have been pasting that format so I thought it would be nice to support both.

@skovy
Copy link

skovy commented Mar 26, 2024

This occurs when pasting from Notes on macOS. Would be great to support both ways! (and maybe always output as the valid HTML structure?)

Edit: commented with a patch on #65 (comment) that solved this problem and the one in that PR for me.

@CodyPChristian
Copy link

@skovy @astrocket Any updates on this being merged?

@astrocket
Copy link
Contributor Author

@neSpecc Can this be merged? or any comment?

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.

4 participants