Draft-js: How to give a focus effect to my Draft JS Editor border?

Created on 21 Mar 2017  路  3Comments  路  Source: facebook/draft-js

I understand that the draft js editor is not a classic textarea element. I applied some styles to make it look better. However, i can't find this little trick that doing a natural html focus effect when i'm focusing on my draftjs editor. I am not a css expert, i've tried to using the :active pseudo class the effect disappear once a release the click.

I just want the borders to be like a classic html input focus effect.

How can a set up this ?

thanks

Most helpful comment

Answered the same question yesterday on SO, I'll just link that here for future reference: http://stackoverflow.com/questions/42921101/how-to-give-a-focus-effect-to-my-draft-js-editor-border

All 3 comments

Answered the same question yesterday on SO, I'll just link that here for future reference: http://stackoverflow.com/questions/42921101/how-to-give-a-focus-effect-to-my-draft-js-editor-border

Thanks for the info @tobiasandersen , I've submitted a PR to include this information in the editor API reference, as it was missing.

Just merged https://github.com/facebook/draft-js/pull/1179 - thanks @ambewas

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ufo22940268 picture ufo22940268  路  3Comments

sandorvasas picture sandorvasas  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments

hs737 picture hs737  路  3Comments

darklightblue picture darklightblue  路  3Comments