'How to retrieve text from draft js while keeping the styling (bullet points) and mention names intact?

I am using draft js in my project for generating notes. After the note is generated, the user can copy the note content into their clipboard. However, only the plain text is copied as it is while the mentions are not copied properly (the type of mention is copied instead). Is there a work around to this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source