mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
fix: add support for pasting plain text into editable void (#5305)
This commit is contained in:
5
.changeset/large-steaks-try.md
Normal file
5
.changeset/large-steaks-try.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Allow pasting plain text into editable voids
|
@@ -1610,7 +1610,7 @@ export const Editable = (props: EditableProps) => {
|
||||
(event: React.ClipboardEvent<HTMLDivElement>) => {
|
||||
if (
|
||||
!readOnly &&
|
||||
ReactEditor.hasSelectableTarget(editor, event.target) &&
|
||||
ReactEditor.hasEditableTarget(editor, event.target) &&
|
||||
!isEventHandled(event, attributes.onPaste)
|
||||
) {
|
||||
// COMPAT: Certain browsers don't support the `beforeinput` event, so we
|
||||
|
Reference in New Issue
Block a user