draft-js icon indicating copy to clipboard operation
draft-js copied to clipboard

Unexpected/inconsistent entity-merging behavior

Open kilometers opened this issue 7 years ago • 1 comments

This is a bug report, unless this behavior was intended. If intentional, then it's a feature request.

When adding entities within areas already bounded by a larger entity, the old entity remains while the new entity is created. However, the reverse of this is not true. When creating a new entity which bounds smaller, older ones, the inner entities are deleted and replaced by the larger one, even if their types are different.

I'd expect entities, particularly when they're of differing types, not to merge. The ability to control entity merging would be splendid. This could be related to #1342 .

kilometers avatar Jan 06 '19 11:01 kilometers

I just realized what's actually happening is perfectly consistent. The new entity is simply overwriting a small portion of the larger one. So the real issue is still that multiple entities aren't supported on a single character. I'll close this then.

kilometers avatar Jan 06 '19 11:01 kilometers