From a389987530b3ee1efc0f0a8bead040bef90b8d63 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 8 Aug 2018 12:45:59 +1000 Subject: [PATCH] fix images not pasting as links --- aqt/editor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aqt/editor.py b/aqt/editor.py index a8534bf2f..a15194e9c 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -942,7 +942,9 @@ class EditorWebView(AnkiWebView): return data = open(path, "rb").read() - return self.editor._addPastedImage(data, ext) + fname = self.editor._addPastedImage(data, ext) + if fname: + return self.editor.fnameToLink(fname) def flagAnkiText(self): # be ready to adjust when clipboard event fires