# Drag’n’drop is not working within the HTML editor

**URL:** <https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730>\
**Category:** Help\
**Created:** [January 16, 2022, 6:54pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730 "2022-01-16T18:54:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [January 16, 2022, 6:54pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/1 "2022-01-16T18:54:06Z")

</div>

I discover this issue since version 2.1.49.  
I’m running Manjaro KDE LTS-Kernel and NVidia proprietary drivers. I tried OpenGL as well as Software driver, but no difference on my problem.

Now about the actual issue:  
I was used to add my Kanji pictures from an online library, just by drag&drop the pic to the correct place within the HTML editor. It automatically replaced the pic with the https: / / path / to / pic.jpg .  
Since the new HTML editor is in charge I’m no longer able to drag&drop ANYTHING to the HTML editor. I can’t even click into the editor window to set the cursor’s position - it always jumps to the end of the text.

Using the window switcher ([Alt] + [Tab]) keeps the cursor at least at it’s former set position. But for the pictures I’ve to copy the pic-address directly and then go to the HTML editor and use [Ctrl] + [V] to paste it.  
Actually meaning: e.g. a word with two Kanji

- until now:
  1. two times [Ctrl] + [V] to paste \<img src="" /\> two times
  2. drag&drop pics from browser (Firefox) to the designated positions between “”
  3. redo 2 until all files are done
  4. done

- since new version:
  1. two times [Ctrl] + [V] to paste \<img src="" /\> two times
  2. right click pic to click “Copy picture address”
  3. go to HTML editor
  4. \<if one forgets to use [Alt] + [Tab] and clicks…\> move the cursor using the arrow keys (again, if not already was moved this step is needed anyway)
  5. use [Ctrl] + [V] to paste pic’s address
  6. repeat from 4 until all files are done
  7. done

Maybe you can see: It’s more effort for what was already good… Can I solve this in any way? If not: Please allow drag&drop again! 😢

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [January 17, 2022, 2:59am UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/2 "2022-01-17T02:59:34Z")

</div>

Why don’t you just drag the images directly into your fields, instead of the HTML area? Remote image links are not recommended, as they will break whenever the remote host makes changes to their website.

---

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [January 18, 2022, 7:33pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/3 "2022-01-18T19:33:47Z")

</div>

Thanks. You showed me, I missed the main point in my topic myself. 😥  
Should I open a new topic? I can’t change the header…?  
It’s not the problem about the HTML-Links. The main point is:

**I can’t use my mouse cursor to do anything at the HTML editor.**

---

<div class="post-metadata">

**Author:** ![hengiesel](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/hengiesel/32/920_2.png) [@hengiesel](https://forums.ankiweb.net/u/hengiesel)\
**Post date:** [January 18, 2022, 7:44pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/4 "2022-01-18T19:44:18Z")

</div>

I cannot recreate the bug in 2.1.49. Have you made sure it’s not because of add-ons? Try this link: [When problems occur - Frequently Asked Questions](https://faqs.ankiweb.net/when-problems-occur.html)

---

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [January 18, 2022, 8:22pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/5 "2022-01-18T20:22:19Z")

</div>

Yeah… I’m pretty sure. As long as Anki doesn’t bring any addons by default, I didn’t install any at all. 😆

Could it be any missing library? Or any part of Qt/KDE?

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [January 18, 2022, 10:32pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/6 "2022-01-18T22:32:26Z")

</div>

> [@DomX](#):
>
> Could it be any missing library?

If you’ve installed Anki with pamac, some libraries could indeed be missing or just outdated: [Third party Linux packages and source builds are not supported / Anki Ecosystem / Knowledge Base - AnkiMobile (iPhone/iPad) Support](https://anki.tenderapp.com/kb/anki-ecosystem/third-party-linux-packages-and-source-builds-are-not-supported)

In that case, follow the instructions here [Install & Upgrade - Anki Manual](https://docs.ankiweb.net/platform/linux/installing.html) and see if the problem persists.

---

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [January 23, 2022, 5:01pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/7 "2022-01-23T17:01:31Z")

</div>

I installed anki (AUR) and anki-official-binary-bundle (AUR), one after one. All the same issues.

The anki package pulls much dependencies, the aobb doesn’t. But both work the very same way. (I didn’t see any difference, also not at my problem. Any further ideas?

https:// aur .archlinux .org/packages/anki  
https:// aur .archlinux .org/packages/anki-official-binary-bundle/

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [January 23, 2022, 7:39pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/8 "2022-01-23T19:39:16Z")

</div>

I think I wasn’t clear enough: On Linux, you should **never install Anki with a package manager.** The only reliable way to get the fully working current version is to download Anki from [https://apps.ankiweb.net/](https://apps.ankiweb.net/) and follow these instructions:

> [@kleinerpirat](#):
>
> [Install & Upgrade - Anki Manual](https://docs.ankiweb.net/platform/linux/installing.html)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [January 24, 2022, 12:42pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/9 "2022-01-24T12:42:54Z")

</div>

Trying the official downloads when you run into trouble is good advice, though by the looks of it [PKGBUILD - aur.git - AUR Package Repositories](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=anki-official-binary-bundle) is basically wrapping the official bundle, so one would hope it’d behave the same way. What does the about screen say when you run the bundle version?

---

<div class="post-metadata">

**Author:** ![BlackBeans](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/blackbeans/32/2283_2.png) [@BlackBeans](https://forums.ankiweb.net/u/BlackBeans)\
**Post date:** [January 24, 2022, 5:55pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/10 "2022-01-24T17:55:02Z")

</div>

> [@kleinerpirat](#):
>
> On Linux, you should **never install Anki with a package manager.**

There are some package managers that keep up with Anki. Besides some that are distro-agnostic (last time I checked, both snap and flatpak had the latest version, or the one just before), NixOS and Arch (AUR) do have the latest version available, although both fetch binaries (it really seems no one around has achieved to package Anki properly…).

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [January 24, 2022, 6:53pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/11 "2022-01-24T18:53:09Z")

</div>

I have to admit, I’ve never installed a third-party packaged or binary build.

My warning about those stems from the fact that just over the last week at least three forum topics have emerged that could have been prevented by just installing the official package - and it’s a fairly regular cause for all kinds of issues that cannot be replicated on proper builds.

---

<div class="post-metadata">

**Author:** ![BlackBeans](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/blackbeans/32/2283_2.png) [@BlackBeans](https://forums.ankiweb.net/u/BlackBeans)\
**Post date:** [January 24, 2022, 6:55pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/12 "2022-01-24T18:55:43Z")

</div>

Yes, I saw that. Maybe it means it would be worth the effort to find out why is it so hard to package Anki, so that packagers could do their work and Linux users never have this kind of issue.

---

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [January 24, 2022, 7:06pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/13 "2022-01-24T19:06:22Z")

</div>

As far as I see the anki (not anki-official-binary-bundle) AUR package is built from source.  
https:// aur. archlinux. org /cgit/aur.git/tree/PKGBUILD?h=anki

I think it is even doing better work than I could:  
All I know about building packages by source is something like  
./configure [options]  
make  
make install  
And installing dependencies, which were complained, of course. But this PKGBUILD is running without any errors - I tried running the ./run script for bazel compiling, but it’s arguing, my bazel is to new. (4.2.2.1 \< 4.0.0)  
This seems to be “solved” by removing the the .bazelversion file through PKGBUILD. Maybe I will give it a try in a VM.

P.S.: @kleinerpirat: Yes, as far as I understood, is should NOT build it from source… Quite the opposite. 😅

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [January 24, 2022, 8:07pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/14 "2022-01-24T20:07:42Z")

</div>

> [@DomX](#):
>
> All I know about building packages by source is something like  
> ./configure [options]  
> make  
> make install

You don’t need to know anything about building if you just follow the installation instructions. It’s literally just unpacking the folder and running a single command. Have you tried that yet?

Again, here’s the link:

> [@kleinerpirat](#):
>
> > [@kleinerpirat](#):
> >
> > [Install & Upgrade - Anki Manual](https://docs.ankiweb.net/platform/linux/installing.html)

Sorry for being so annoying about this, but I’d be very interested to know if installing Anki the “canonical” way would have solved the issue.

> [@DomX](#):
>
> Yes, as far as I understood, is should NOT build it from source… Quite the opposite.

Building from source yourself shouldn’t pose any issues. The problem are the packaged builds **from third parties** , which often contain dated libraries or old Anki versions.

* * *

Also, would you mind checking your Anki version on that AUR build?

> [@dae](#):
>
> What does the about screen say when you run the bundle version?

That would be useful info too 🙂

---

<div class="post-metadata">

**Author:** ![BlackBeans](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/blackbeans/32/2283_2.png) [@BlackBeans](https://forums.ankiweb.net/u/BlackBeans)\
**Post date:** [January 24, 2022, 9:08pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/15 "2022-01-24T21:08:15Z")

</div>

> [@kleinerpirat](#):
>
> Also, would you mind checking your Anki version on that AUR build?

The AUR package linked by @DomX builds Anki 2.1.49.

---

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [February 7, 2022, 4:42pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/16 "2022-02-07T16:42:39Z")

</div>

> [@kleinerpirat](#):
>
> You don’t need to know anything about building if you just follow the installation instructions. It’s literally just unpacking the folder and running a single command. Have you tried that yet?

…you said…  
I set up a fresh VM with Ubuntu, updated it. Yeah… No “literally unpacking and running” at all! Even if I got some things it complained about solved it kept complaining about any missing python modules or whatever…  
Never the less I got it starting - no idea if all dependencies where satisfied properly, the remaining messages are:

```auto
dominik@anki-test:~$ anki
Qt info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. 
mpv not found, reverting to mplayer
```

All in all: Differences are few: Now I can set the cursor by mouse and make selections by mouse within the HTML editor. But I still can’t drag’n’drop anything from or to the HTML editor. It’s slightly better, than on Manajro, but still no full mouse support for the HTML editor…?

---

<div class="post-metadata">

**Author:** ![kleinerpirat](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/kleinerpirat/32/19863_2.png) [@kleinerpirat](https://forums.ankiweb.net/u/kleinerpirat)\
**Post date:** [February 7, 2022, 6:02pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/17 "2022-02-07T18:02:03Z")

</div>

> [@DomX](#):
>
> I set up a fresh VM with Ubuntu, updated it.

Nice to know, but should be irrelevant regarding this issue.

> [@DomX](#):
>
> No “literally unpacking and running” at all!

Would you mind explaining what exactly you did and at which step you had to deviate from given instructions to get Anki working?

> [@DomX](#):
>
> But I still can’t drag’n’drop anything from or to the HTML editor.

If I understood your initial post correctly, you used to drag and drop image URLs into the source of image tags. Is there any reason why you can’t just click in between the quotes and press Ctrl+V?

---

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [February 7, 2022, 7:15pm UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/18 "2022-02-07T19:15:53Z")

</div>

> [@kleinerpirat](#):
>
> Would you mind explaining what exactly you did and at which step you had to deviate from given instructions to get Anki working?

First run:

1. Downloaded https:// github . com/ankitects/anki/releases/download/2.1.49/anki-2.1.49-  
linux.tar.bz2
2. untared and `sudo ./install.sh`ed it
3. Tried to run and got thins

```auto
File "runanki.py", line 4, in <module>
  File "aqt/ __init__.py", line 437, in run
  File "aqt/ __init__.py", line 498, in _run
  File "aqt/profiles.py", line 127, in setupMeta
  File "aqt/profiles.py", line 403, in _loadMeta
resetting corrupt _global
Qt info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. 
Qt info: Could not load the Qt platform plugin "xcb" in "" even though it was found. 
Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
 
Aborted (core dumped)
```

1. Solved by

```auto
sudo apt install xcb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 python3 python3-pyqt5 libqt5core5a python3-distutils python3-bs4 python3-pyaudio python3-requests python3-send2trash python3-decorator python3-markdown python3-jsonschema python3-distro libjs-jquery libjs-jquery-ui libjs-jquery-flot libjs-mathjax
```

1. Started Anki
2. Tried to drag’n’drop any content  
→ nothing happens when I try to add text via drag’n’drop  
→ get following error, when I try to add a remote picture as I do since many years:

```auto
Qt warning: Unknown or unsupported skia image format
```

Addition: This message occurs only once and never again. (At least I was unable to reproduce it.)  
But in the end: I can’t add any data (neither pic nor text) by drag’n’drop.

* * *

Second run:  
https:// github .com/ankitects/anki/blob/main/docs/linux.md → built `2.1.50 (dev)`  
When I tried drag’n’drop a pic it threw following error, but didn’t add the pic:

```auto
JS error /_anki/js/browser_editor.js:75699 Uncaught TypeError: Cannot read property 'shadowRoot' of undefined
```

Additinally I noticed: Anki is poorly slow in this way of running, and furthermore the whole VM’s GUI became slow while Anki was running this way…

* * *

> [@kleinerpirat](#):
>
> Nice to know, but should be irrelevant regarding this issue.

I tought it is relevant - isn’t Ubuntu/Debian Anki’s mainly supported Linux?

* * *

> [@kleinerpirat](#):
>
> If I understood your initial post correctly, you used to drag and drop image URLs into the source of image tags. Is there any reason why you can’t just click in between the quotes and press Ctrl+V?

You’re right. But this is one of the rare moments, where a drag’n’drop is much faster than right click → copy graphic’ss address → Click into Anki → Ctrl+V  
or replace “graphic’s address” with “show graphic” and click / combo to address bar.

Basically: “One click + hold + release” versus multiple clicks, menus and mouse movements.  
For only some time work it makes no difference, but on regular work with an huge amount of repetition you will get every additional action very fast.

All in short: Adding sixty cards was regular for me to be done within 60 to 70 minutes. With so much clicks it is down to round about 15 to 20 cards in the SAME TIME of 60 to 70 minutes. And the only thing changed was the HTML editor which now needs much more clicks and keys on the pix.  
My vocabulary is increasing, as my Japanese is getting better, especially for Japanese characters. Productivity drop makes it a pain to me. 😢

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [February 8, 2022, 6:21am UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/19 "2022-02-08T06:21:56Z")

</div>

> [@DomX](#):
>
> Tried to run → many complains about bazel

There shouldn’t be any mention of Bazel if you’re using the packaged version and install.sh. Maybe you had other files lying around? If you repeat those steps and get the same errors, what exactly do they say?

---

<div class="post-metadata">

**Author:** ![DomX](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/domx/32/7993_2.png) [@DomX](https://forums.ankiweb.net/u/DomX)\
**Post date:** [February 8, 2022, 10:39am UTC](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730/20 "2022-02-08T10:39:41Z")

</div>

Sorry, @dae.  
I wrote “First run” from my memory, and was quite far away from the actual issue. 😅

I reworked the part “First run”. (But still having the issue.)

[Next page](https://forums.ankiweb.net/t/drag-n-drop-is-not-working-within-the-html-editor/16730.md?page=2)
