sstur / react-rte

Pure React rich text WYSIWYG editor based on draft-js.
https://react-rte.org
ISC License
2.86k stars 428 forks source link

Supplying an onTab prop to DraftEditor has been deprecated warning when used with draft js 0.11.x #397

Open erikt9 opened 3 years ago

erikt9 commented 3 years ago

When using React-RTE with draft js 0.11.x with react in development mode, this warning is printed to the console:

[Warning] Supplying an `onTab` prop to `DraftEditor` has been deprecated. If your handler needs access to the keyboard event, supply a custom `keyBindingFn` prop that falls back to the default one (eg. https://is.gd/wHKQ3W). 

I believe this is coming from supplying an onTab property in RichTextEditor.js (currently at line 154)

tptspe commented 2 years ago

I have same issue in my test file. console.warn

Supplying anonTabprop toDraftEditorhas been deprecated. If your handler needs access to the keyboard event, supply a customkeyBindingFnprop that falls back to the default one (eg. https://is.gd/wHKQ3W).