react-mentions icon indicating copy to clipboard operation
react-mentions copied to clipboard

Styling the display text will also render the default text (2 overlapping versions of the text is displayed)

Open dmdum opened this issue 1 year ago • 5 comments

Steps to reproduce:

  1. Visit this sample link
  2. Mention any of the mention options.

Expected behaviour: Only 1 version should be displayed. It should be the styled version.

Observed behaviour: 2 Overlapping versions are displayed. The default and the styled version. image

Workaround: None so far

dmdum avatar Aug 22 '23 07:08 dmdum

Hi, I have the same problem. Did you find any solution?

JoacoBert avatar Aug 24 '23 18:08 JoacoBert

Hi, I have the same problem. Did you find any solution?

I've removed the styling for now. Try adding a z-index on the styles to cover the original. It doesn't completely work for me because the styled text still isn't on the same level as the original so it can't cover it completely, but maybe it will for you.

dmdum avatar Aug 27 '23 00:08 dmdum

Thanks for your answer. I tried different ways but got no results. In the case of finding the solution I will let you know, and if you find it I hope you can let me know.

JoacoBert avatar Aug 28 '23 19:08 JoacoBert

I'll definitely share it here. Thanks!

dmdum avatar Aug 29 '23 00:08 dmdum

you can try to make on layer transparent it worked for me i am using js styles given in examples and by making one layer transparent you achieve the result use styles

https://github.com/signavio/react-mentions/blob/master/demo/src/examples/defaultStyle.js

kumarajay0412 avatar Sep 27 '23 11:09 kumarajay0412