facebookarchive / draft-js

A React framework for building text editors.

Home Page:https://draftjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minor issue with copy-pasting rich text styles

flarnie opened this issue · comments

Do you want to request a feature or report a bug?
Bug - but it's pretty minor.

What is the current behavior?
Nested list styles are not retained when copy-pasting between Draft instances. See screenshot.
screen shot 2017-04-22 at 3 07 04 pm

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/stopachka/m6z0xn4r/.

  1. Open the rich text editor example
  2. Create a nested list
  3. Open another tab with the rich text editor example
  4. Copy paste between them.

What is the expected behavior?
The nesting should be copied accurately.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Chrome, and not sure which version this started in. We didn't support nesting until recently also.

I think this got solved in #1605, except for lists deeper than 5 levels (#1605 (comment)).

#1784 fixes this regardless of list depth.