facebookarchive / draft-js

A React framework for building text editors.
https://draftjs.org/
MIT License
22.56k stars 2.64k forks source link

Ordered and unordered lists don't work #3166

Open weeebdev opened 1 year ago

weeebdev commented 1 year ago

Do you want to request a feature or report a bug?

It's rather a bug or my own mistake

What is the current behavior?

When I call RichUtils.toggleBlockType it doesn't add list

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/gmertk/e61z7nfa/.

See the sandbox https://codesandbox.io/s/draft-js-with-custom-components-rko84h?file=/src/CustomEditor.tsx

What is the expected behavior?

Added list when click on the corresponding button on the toolbar.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

idk