javascriptreactjsdraftjsdraft-js-plugins

Draft JS: hide the cursor


I'm trying to hide the cursor in draft-js. I want it to function as normal but the user not to be able to see the blinking cursor, is there any way of doing this in draft JS?


Solution

  • You can set the caret-color which is support by all modern browser nowadays: https://caniuse.com/?search=caret-color

        .public-DraftStyleDefault-block {
            caret-color: transparent;
        }