I have a simple draftjs editor (megadraft
if it matters). I want to set it up so that my content is displayed and after the cursor, I have placeholder text (grayed out). How would I do this?
Asked
Active
Viewed 512 times
2

Shamoon
- 41,293
- 91
- 306
- 570
-
Depending on your use case you could generate a virtual element with getVisibleSelectionRect from draft.js and use it as reference Other option would be to show a div at cursor position: https://stackoverflow.com/questions/128342/display-div-at-cursor-position-in-textarea/163395 – user7646471 Jul 06 '20 at 19:39