Skip to content

Commit

Permalink
Unable pasting photos and styled text (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfurtak authored Jun 25, 2024
1 parent d050659 commit 2ab7e30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MarkdownTextInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,13 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
[onClick, updateSelection],
);

const handlePaste = useCallback(() => {
const handlePaste = useCallback((e) => {
pasteRef.current = true;
e.preventDefault();

const clipboardData = e.clipboardData;
const text = clipboardData.getData('text/plain');
document.execCommand('insertText', false, text);
}, []);

const startComposition = useCallback(() => {
Expand Down

0 comments on commit 2ab7e30

Please sign in to comment.