prioritize images over html for now
when a user copies an image from the browser to the clipboard, we need to do this so the image pastes, as we currently don't support images derived from html pastes (issue 92)
This commit is contained in:
parent
a6b44cff01
commit
426eff4cff
@ -1071,10 +1071,13 @@ class EditorWebView(AnkiWebView):
|
||||
return self._processUrls(mime)
|
||||
elif mime.hasText() and (self.strip or not mime.hasHtml()):
|
||||
return self._processText(mime)
|
||||
elif mime.hasHtml():
|
||||
return self._processHtml(mime)
|
||||
# we currently aren't able to extract images from html, so we prioritize
|
||||
# images over html in cases where we have both. this is a hack until
|
||||
# issue 92 is implemented
|
||||
elif mime.hasImage():
|
||||
return self._processImage(mime)
|
||||
elif mime.hasHtml():
|
||||
return self._processHtml(mime)
|
||||
else:
|
||||
# nothing
|
||||
return QMimeData()
|
||||
|
Loading…
Reference in New Issue
Block a user