You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When pasting links from the iOS share sheet to the quill editor, nothing is pasted.
I saw a similar issue mentioned on the prose mirror discussion page. They solved this issue by making sure to capture "text/uri-list" from the clipboard. Not sure if it is the same problem, I will keep trying to debug to find the error. I am quite new to quill so it will take me some time to find the exact problem. Perhaps someone who understands quill better could find the solution faster.
The text was updated successfully, but these errors were encountered:
// Register an event listener for the paste event on the Quill editorquill.root.addEventListener('paste',function(event){// Get the clipboard datavarclipboardData=event.clipboardData||window.clipboardData;if(!clipboardData)return;// Extract URI content from the clipboard datavaruri=clipboardData.getData("text/uri-list");if(uri){// Prevent default paste behaviorevent.preventDefault();// Insert URI as plain text at the current cursor positionvarrange=quill.getSelection();quill.insertText(range.index,uri);}});
edit: I noticed this causes the url to paste twice on macOS, so I added to check iOS:
When pasting links from the iOS share sheet to the quill editor, nothing is pasted.
![ezgif com-optimize-2](https://private-user-images.githubusercontent.com/160181680/313479409-d3a0aba9-9cd0-4b22-9ac4-6d57485b857c.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzEwNzgsIm5iZiI6MTczOTY3MDc3OCwicGF0aCI6Ii8xNjAxODE2ODAvMzEzNDc5NDA5LWQzYTBhYmE5LTljZDAtNGIyMi05YWM0LTZkNTc0ODViODU3Yy5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQwMTUyNThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iN2IxOGM0ODEwZGE3NWU1YTgwZmQwMjg3ZTFhYzk1OTE0ZmRlZjZmNWY2YzMxNzEzZGViODVhMjkxYTdjYTdhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.t2zxH0XvzQPQhzIacaVf5Bgn4eVwOcDZaAg5M-R-U-w)
I saw a similar issue mentioned on the prose mirror discussion page. They solved this issue by making sure to capture "text/uri-list" from the clipboard. Not sure if it is the same problem, I will keep trying to debug to find the error. I am quite new to quill so it will take me some time to find the exact problem. Perhaps someone who understands quill better could find the solution faster.
The text was updated successfully, but these errors were encountered: