Prevent >64k text in composition box; truncate too-large drafts
This commit is contained in:
parent
87ae65c852
commit
095cd884a2
5 changed files with 116 additions and 7 deletions
|
@ -38,7 +38,11 @@ export type OwnProps = {
|
|||
|
||||
export type Props = Pick<
|
||||
CompositionInputProps,
|
||||
'onSubmit' | 'onEditorSizeChange' | 'onEditorStateChange' | 'startingText'
|
||||
| 'onSubmit'
|
||||
| 'onEditorSizeChange'
|
||||
| 'onEditorStateChange'
|
||||
| 'onTextTooLong'
|
||||
| 'startingText'
|
||||
> &
|
||||
Pick<
|
||||
EmojiButtonProps,
|
||||
|
@ -76,6 +80,7 @@ export const CompositionArea = ({
|
|||
compositionApi,
|
||||
onEditorSizeChange,
|
||||
onEditorStateChange,
|
||||
onTextTooLong,
|
||||
startingText,
|
||||
// EmojiButton
|
||||
onPickEmoji,
|
||||
|
@ -336,6 +341,7 @@ export const CompositionArea = ({
|
|||
onSubmit={handleSubmit}
|
||||
onEditorSizeChange={onEditorSizeChange}
|
||||
onEditorStateChange={onEditorStateChange}
|
||||
onTextTooLong={onTextTooLong}
|
||||
onDirtyChange={setDirty}
|
||||
skinTone={skinTone}
|
||||
startingText={startingText}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue