Draft-js-plugins: Miss match in entityRanges with emoji as presiding text to mentions

Created on 20 Nov 2018  路  4Comments  路  Source: draft-js-plugins/draft-js-plugins

Hi

i am using mentions plugin it works awesome as expected without emojis/unicode.

My situations

ex: "馃榾 dude Suresh Chandrababu" is my text in editor. Suresh Chandrababu is mention.

I need to extract the mention offset position, length and send to my API, problem here is when emojis/unicode added before the mentions, offset returned by Draft editor was wrong.

Expected o/p: entityRange - offset:3, length: 18
Actual o/p: entityRange - offset:2, length: 18

Emoji's length is 2, but entityRange consider it as 1.

How to handle this situation.

o/p:
screen shot 2018-11-20 at 1 17 48 pm

Thanks in advance

stale

Most helpful comment

Any update on this?

All 4 comments

We also have this problem, anyone has any ideas?

Any update on this?

Same problem here.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paglias picture paglias  路  4Comments

sessionboy picture sessionboy  路  3Comments

jamesfzhang picture jamesfzhang  路  3Comments

svnm picture svnm  路  3Comments

joehua87 picture joehua87  路  4Comments