mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
drop events from anywhere in anki should preserve formatting
This commit is contained in:
parent
157801621c
commit
d0c9beddfd
1 changed files with 3 additions and 3 deletions
|
@ -788,8 +788,8 @@ class EditorWebView(AnkiWebView):
|
||||||
|
|
||||||
def dropEvent(self, evt):
|
def dropEvent(self, evt):
|
||||||
oldmime = evt.mimeData()
|
oldmime = evt.mimeData()
|
||||||
# coming from us?
|
# coming from this program?
|
||||||
if evt.source() == self:
|
if evt.source():
|
||||||
# if they're copying just an image, we need to turn it into html
|
# if they're copying just an image, we need to turn it into html
|
||||||
# again
|
# again
|
||||||
txt = ""
|
txt = ""
|
||||||
|
@ -800,7 +800,7 @@ class EditorWebView(AnkiWebView):
|
||||||
unicode(oldmime.urls()[0].toString()))
|
unicode(oldmime.urls()[0].toString()))
|
||||||
mime.setHtml(txt)
|
mime.setHtml(txt)
|
||||||
else:
|
else:
|
||||||
mime.setText(oldmime.text())
|
mime.setHtml(oldmime.html())
|
||||||
else:
|
else:
|
||||||
mime = self._processMime(oldmime)
|
mime = self._processMime(oldmime)
|
||||||
# create a new event with the new mime data
|
# create a new event with the new mime data
|
||||||
|
|
Loading…
Reference in a new issue