Skip to content
New issue

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

Add submit, multiline and maxlength support #1465

Merged
merged 4 commits into from
Oct 14, 2020

Conversation

skjnldsv
Copy link
Contributor

@skjnldsv skjnldsv commented Oct 13, 2020

  • Added multiline prop
    • multiline false is looking like a default input, can still span multilines, but not required
    • multiline true is looking like a textarea
  • Added enter handlers
    • enter = submit if multiline is false, new line if true
    • shift + enter = new line
    • ctrl + enter = submit
  • Added maxlength support
    Capture d’écran_2020-10-13_17-15-58
  • Updated docs

@skjnldsv skjnldsv self-assigned this Oct 13, 2020
@skjnldsv skjnldsv added 3. to review Waiting for reviews feature: rich-contenteditable Related to the rich-contenteditable components enhancement New feature or request labels Oct 13, 2020
@skjnldsv skjnldsv force-pushed the feat/richContenteditor-maxlength-submit branch 3 times, most recently from 972debc to 5c13d4d Compare October 13, 2020 15:31
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the feat/richContenteditor-maxlength-submit branch from 5c13d4d to 82cc44c Compare October 13, 2020 15:36
Copy link
Contributor

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good design-wise

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the feat/richContenteditor-maxlength-submit branch from 474d0d9 to c8fbece Compare October 14, 2020 09:01
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@ChristophWurst ChristophWurst merged commit 1860abe into master Oct 14, 2020
@ChristophWurst ChristophWurst deleted the feat/richContenteditor-maxlength-submit branch October 14, 2020 19:20
Copy link
Contributor

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I am late to the party... :-P

enter = submit if multiline is false, new line if true

Could this be made configurable so enter can also send if multiline is true? In general sending messages on Talk should be done when just pressing enter, but the message field should also be multiline.

@skjnldsv
Copy link
Contributor Author

In general sending messages on Talk should be done when just pressing enter, but the message field should also be multiline.

Multiline is only the default visual.
You can always enter new lines whatever multiline is set to

See first post

  • multiline false is looking like a default input, can still span multilines, but not required
  • multiline true is looking like a textarea

@danxuliu
Copy link
Contributor

Multiline is only the default visual.
You can always enter new lines whatever multiline is set to

Oh, right, sorry 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request feature: rich-contenteditable Related to the rich-contenteditable components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants