# Feature request: Add back the ability to copy MathJax expressions

**URL:** https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994
**Category:** Suggestions
**Created:** [April 11, 2022, 6:25pm UTC](https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994 "2022-04-11T18:25:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)
#### Post date: [April 11, 2022, 6:25pm UTC](https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994/1 "2022-04-11T18:25:38Z")

</div>

I don’t know if this was discussed before, but with the addition of the MathJax preview feature (which is nice; great work @hengiesel !), we’ve lost the ability to copy expressions like before.

![mathax-preview-copy](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/e/e7662d15899a0e3f1c2902086c25fda0e264881b.gif)

---

<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: [April 11, 2022, 6:59pm UTC](https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994/2 "2022-04-11T18:59:39Z")

</div>

True, I’ll take a look into that.

As a work-around for now, you can copy/paste from 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: [April 12, 2022, 9:40am UTC](https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994/3 "2022-04-12T09:40:44Z")

</div>

Looking into this some more, I realized this is actually a bug on Windows. It does work on macOS.

---

<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: [April 12, 2022, 12:14pm UTC](https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994/4 "2022-04-12T12:14:30Z")

</div>

Can you also confirm that this is in fact a Qt6 issue? I think it’s because [`clipboard.dataChanged`](https://github.com/ankitects/anki/blob/51a0641bba5034631c56ea0d513ee993e43c81d9/qt/aqt/editor.py#L1167) does not fire in Qt6 on Windows, which means the internal flag is never set. That also explains why the Mathjax image is stripped: it’s treated as an external image.

---

<div class="post-metadata">

### Author: ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)
#### Post date: [April 12, 2022, 11:12pm UTC](https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994/5 "2022-04-12T23:12:38Z")

</div>

> [@hengiesel](#):
>
> Can you also confirm that this is in fact a Qt6 issue?

It’s a Qt6 issue, apparently. I can’t reproduce it in the Qt5 build.

---

<div class="post-metadata">

### Author: ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)
#### Post date: [April 12, 2022, 11:16pm UTC](https://forums.ankiweb.net/t/feature-request-add-back-the-ability-to-copy-mathjax-expressions/18994/6 "2022-04-12T23:16:13Z")

</div>

This ticket in Qt’s bug tracker looks related: [[COIN-830] QClipboard::dataChanged() was not emitted in QtWebEngine context - Qt Bug Tracker](https://bugreports.qt.io/browse/COIN-830)
