0

How can I add padding to the Editor of Draft js in a way that when I click on the padding area the Editor is selected?

Adding the padding to container div of the Editor will show the padding correctly but it will not be possible to click on the padding area to start writing in the Editor:

<div style={{padding:8}> <Editor onChange={this.onChange} /> </div>

Giorgio
  • 13,129
  • 12
  • 48
  • 75

1 Answers1

1

something like this should work.

<div onClick={e=>{e.preventDefault();this.edt.focus()}}>
   <Editor ref={v=>this.edt=v} />
</div>
Jiang YD
  • 3,205
  • 1
  • 14
  • 20