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

Need to prevent direct images pasting using Safari #109

Open
cyrilbornet opened this issue Nov 1, 2013 · 0 comments
Open

Need to prevent direct images pasting using Safari #109

cyrilbornet opened this issue Nov 1, 2013 · 0 comments

Comments

@cyrilbornet
Copy link

Safari (at least on Mac) allows user to copy-paste images directly in the text by rendering them in the form of

Needless to say, the image is not uploaded and disappears as soon as the page is refreshed.

A quick&dirty fix for this could be to update the paste plug-in of the common package, at lines 246-248:

restoreSelection(range);
if (content.indexOf("webkit-fake-url://") != -1) return;
prepRangeForPaste(range);

Works seamlessly on dhwriter.
Credits for this idea to jejacks0n/mercury#179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant