We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to disable mulitline Input? Meaning, no breaks. And when the user presses return while typing, nothing happens.
return
The text was updated successfully, but these errors were encountered:
You can just add onKeyDown={e => e.keyCode === 13 && e.preventDefault()} to your ContentEditable component.
onKeyDown={e => e.keyCode === 13 && e.preventDefault()}
ContentEditable
Sorry, something went wrong.
@ericnmurphy but this doesn't prevent someone pasting in line breaks, or does it?
I use this code to keep single line
onChange={e => { // strip html const node = document.createElement('div') node.innerHTML = e.target.value const value = node.innerText.replace(/(?:\r\n|\r|\n)/g, ' ') this.onChange(value) }}
No branches or pull requests
Is it possible to disable mulitline Input?
Meaning, no breaks. And when the user presses
return
while typing, nothing happens.The text was updated successfully, but these errors were encountered: