udecode / plate

A rich-text editor powered by AI
https://platejs.org
Other
12k stars 733 forks source link

Pasting a list with md doesnt work #3300

Closed eduardcotmrf closed 4 weeks ago

eduardcotmrf commented 5 months ago

Description

When pasting a list from md creates it as a bullet list, but doesn't display as it.

Happens on your playground and also on the markdown demo playground.

Reproduction URL

https://platejs.org/docs/serializing-md

Reproduction steps

1. Go to 'https://platejs.org/docs/serializing-md'
2. Paste: 

## Lists

Unordered

+ Create a list by starting a line with `+`, `-`, or `*`
+ Sub-lists are made by indenting 2 spaces:
  - Marker character change forces new list start:
    * Ac tristique libero volutpat at
    + Facilisis in pretium nisl aliquet
    - Nulla volutpat aliquam velit
+ Very easy!

Ordered

1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa

1. You can use sequential numbers...
1. ...or keep all the numbers as `1.`
  1. It doesnt display as list.

Plate version

34.1.0

Slate React version

0.102.0

Screenshots

No response

Logs

No response

Browsers

Chrome

Funding

Fund with Polar

abhi-bc commented 4 weeks ago

It works fine now. Just tried pasting here in the latest version or PlateJS v39.2.1 https://platejs.org/docs/markdown and it was working as expected.

My guess why it was not working in v36 is because createListPlugin() may not have been enabled on docs/serialize-md

You can close this issue now