mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
support multiple urls at once in editor
This commit is contained in:
parent
35964fa55c
commit
98a866c2cb
1 changed files with 8 additions and 4 deletions
|
@ -909,10 +909,14 @@ class EditorWebView(AnkiWebView):
|
|||
if not mime.hasUrls():
|
||||
return
|
||||
|
||||
url = mime.urls()[0].toString()
|
||||
# chrome likes to give us the URL twice with a \n
|
||||
url = url.splitlines()[0]
|
||||
return self.editor.urlToLink(url)
|
||||
buf = ""
|
||||
for url in mime.urls():
|
||||
url = url.toString()
|
||||
# chrome likes to give us the URL twice with a \n
|
||||
url = url.splitlines()[0]
|
||||
buf += self.editor.urlToLink(url) or ""
|
||||
|
||||
return buf
|
||||
|
||||
def _processText(self, mime):
|
||||
if not mime.hasText():
|
||||
|
|
Loading…
Reference in a new issue